[asterisk-commits] dlee: branch dlee/ari-event-remodel2 r392387 - /team/dlee/ari-event-remodel2/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 20 16:38:26 CDT 2013
Author: dlee
Date: Thu Jun 20 16:38:25 2013
New Revision: 392387
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=392387
Log:
Include error responses in api docs
Modified:
team/dlee/ari-event-remodel2/rest-api-templates/api.wiki.mustache
team/dlee/ari-event-remodel2/rest-api-templates/swagger_model.py
Modified: team/dlee/ari-event-remodel2/rest-api-templates/api.wiki.mustache
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ari-event-remodel2/rest-api-templates/api.wiki.mustache?view=diff&rev=392387&r1=392386&r2=392387
==============================================================================
--- team/dlee/ari-event-remodel2/rest-api-templates/api.wiki.mustache (original)
+++ team/dlee/ari-event-remodel2/rest-api-templates/api.wiki.mustache Thu Jun 20 16:38:25 2013
@@ -36,6 +36,13 @@
* {{name}}: {{data_type}}{{#default_value}} = {{default_value}}{{/default_value}} - {{description}}
{{/header_parameters}}
{{/has_header_parameters}}
+{{#has_error_responses}}
+
+h3. Error Responses
+{{#error_responses}}
+* {{code}} - {{{reason}}}
+{{/error_responses}}
+{{/has_error_responses}}
{{/operations}}
{{/apis}}
{{/api_declaration}}
Modified: team/dlee/ari-event-remodel2/rest-api-templates/swagger_model.py
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ari-event-remodel2/rest-api-templates/swagger_model.py?view=diff&rev=392387&r1=392386&r2=392387
==============================================================================
--- team/dlee/ari-event-remodel2/rest-api-templates/swagger_model.py (original)
+++ team/dlee/ari-event-remodel2/rest-api-templates/swagger_model.py Thu Jun 20 16:38:25 2013
@@ -328,6 +328,7 @@
err_json = op_json.get('errorResponses') or []
self.error_responses = [
ErrorResponse().load(j, processor, context) for j in err_json]
+ self.has_error_responses = self.error_responses != []
processor.process_operation(self, context)
return self
More information about the asterisk-commits
mailing list