diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-08-19 14:11:37 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-08-19 14:11:37 -0500 |
commit | 16cb686fac456524fdfc94e1c5520b0263b94b0c (patch) | |
tree | cf22ca3c03f4f9cf51240ae274dd473b7a32f754 /rest-api-templates | |
parent | f46f88157e4588ec2d7414f58b912c6022cc8415 (diff) | |
parent | ff2378c73598b4df55ef1508c93bd97c480a4945 (diff) |
Merge "rest-api: Swagger scripts were not replacing format variable in file brief" into 13
Diffstat (limited to 'rest-api-templates')
-rw-r--r-- | rest-api-templates/swagger_model.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rest-api-templates/swagger_model.py b/rest-api-templates/swagger_model.py index f3b49e12e..e0eda0143 100644 --- a/rest-api-templates/swagger_model.py +++ b/rest-api-templates/swagger_model.py @@ -688,7 +688,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] != '/': @@ -697,7 +697,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]) |