summaryrefslogtreecommitdiff
path: root/rest-api-templates
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-08-19 13:20:17 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-08-19 13:20:17 -0500
commit893287704477919dbff88b35a39f6244dcbb0d21 (patch)
treeccebe1774c01d5f964ce8e1f71e7787ad9e85a73 /rest-api-templates
parentbe26a936878a55f6b0b61f7826d540cc18bc4461 (diff)
parent7ea133f2ab656296dee0091f9006ae016783b773 (diff)
Merge "rest-api: Swagger scripts were not replacing format variable in file brief"
Diffstat (limited to 'rest-api-templates')
-rw-r--r--rest-api-templates/swagger_model.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest-api-templates/swagger_model.py b/rest-api-templates/swagger_model.py
index c76cb7f28..c71352a01 100644
--- a/rest-api-templates/swagger_model.py
+++ b/rest-api-templates/swagger_model.py
@@ -691,7 +691,7 @@ class ResourceApi(Stringify):
def load(self, api_json, processor, context):
context = context.next_stack(api_json, 'path')
validate_required_fields(api_json, self.required_fields, context)
- self.path = api_json['path']
+ self.path = api_json['path'].replace('{format}', 'json')
self.description = api_json['description']
if not self.path or self.path[0] != '/':
@@ -700,7 +700,7 @@ class ResourceApi(Stringify):
return self
def load_api_declaration(self, base_dir, processor):
- self.file = (base_dir + self.path).replace('{format}', 'json')
+ self.file = (base_dir + self.path)
self.api_declaration = ApiDeclaration().load_file(self.file, processor)
processor.process_resource_api(self, [self.file])