diff options
author | Matt Jordan <mjordan@digium.com> | 2016-05-18 06:19:58 -0500 |
---|---|---|
committer | Matt Jordan <mjordan@digium.com> | 2016-05-20 09:06:12 -0500 |
commit | e773e3a9bbaf378d53647e4bac3ffcd61afb4ae6 (patch) | |
tree | 23e75dcdaf9b8c72a23387bfabdd42f643e5c480 /rest-api-templates/swagger_model.py | |
parent | d4b77dad1b0154eb3b89133d941dd8d624deda54 (diff) |
ARI: Add the ability to download the media associated with a stored recording
This patch adds a new feature to ARI that allows a client to download
the media associated with a stored recording. The new route is
/recordings/stored/{name}/file, and transmits the underlying binary file
using Asterisk's HTTP server's underlying file transfer facilities.
Because this REST route returns non-JSON, a few small enhancements had
to be made to the Python Swagger generation code, as well as the
mustache templates that generate the ARI bindings.
ASTERISK-26042 #close
Change-Id: I49ec5c4afdec30bb665d9c977ab423b5387e0181
Diffstat (limited to 'rest-api-templates/swagger_model.py')
-rw-r--r-- | rest-api-templates/swagger_model.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rest-api-templates/swagger_model.py b/rest-api-templates/swagger_model.py index f3b49e12e..c76cb7f28 100644 --- a/rest-api-templates/swagger_model.py +++ b/rest-api-templates/swagger_model.py @@ -332,6 +332,7 @@ class SwaggerType(Stringify): self.is_list = None self.singular_name = None self.is_primitive = None + self.is_binary = None def load(self, type_name, processor, context): # Some common errors @@ -346,6 +347,7 @@ class SwaggerType(Stringify): else: self.singular_name = self.name self.is_primitive = self.singular_name in SWAGGER_PRIMITIVES + self.is_binary = (self.singular_name == 'binary') processor.process_type(self, context) return self @@ -401,6 +403,7 @@ class Operation(Stringify): self.has_header_parameters = self.header_parameters and True self.has_parameters = self.has_query_parameters or \ self.has_path_parameters or self.has_header_parameters + self.is_binary_response = self.response_class.is_binary # Body param is different, since there's at most one self.body_parameter = [ |