Skip to content
Snippets Groups Projects
Commit 5de23256 authored by Joshua Colp's avatar Joshua Colp Committed by Gerrit Code Review
Browse files

Merge "rest-api-templates: Wikify error code response reasons"

parents 27e0430f b425850f
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ h3. Header parameters ...@@ -67,7 +67,7 @@ h3. Header parameters
h3. Error Responses h3. Error Responses
{{#error_responses}} {{#error_responses}}
* {{code}} - {{{reason}}} * {{code}} - {{{wiki_reason}}}
{{/error_responses}} {{/error_responses}}
{{/has_error_responses}} {{/has_error_responses}}
{{/operations}} {{/operations}}
......
...@@ -199,6 +199,8 @@ class AsteriskProcessor(SwaggerPostProcessor): ...@@ -199,6 +199,8 @@ class AsteriskProcessor(SwaggerPostProcessor):
raise SwaggerError("Summary should end with .", context) raise SwaggerError("Summary should end with .", context)
operation.wiki_summary = wikify(operation.summary or "") operation.wiki_summary = wikify(operation.summary or "")
operation.wiki_notes = wikify(operation.notes or "") operation.wiki_notes = wikify(operation.notes or "")
for error_response in operation.error_responses:
error_response.wiki_reason = wikify(error_response.reason or "")
operation.parse_body = (operation.body_parameter or operation.has_query_parameters) and True operation.parse_body = (operation.body_parameter or operation.has_query_parameters) and True
def process_parameter(self, parameter, context): def process_parameter(self, parameter, context):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment