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

This commit is contained in:
Joshua Colp 2015-10-21 16:44:30 -05:00 committed by Gerrit Code Review
commit 5de23256b0
2 changed files with 3 additions and 1 deletions

View File

@ -67,7 +67,7 @@ h3. Header parameters
h3. Error Responses
{{#error_responses}}
* {{code}} - {{{reason}}}
* {{code}} - {{{wiki_reason}}}
{{/error_responses}}
{{/has_error_responses}}
{{/operations}}

View File

@ -199,6 +199,8 @@ class AsteriskProcessor(SwaggerPostProcessor):
raise SwaggerError("Summary should end with .", context)
operation.wiki_summary = wikify(operation.summary 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
def process_parameter(self, parameter, context):