[asterisk-commits] dlee: branch 12 r397927 - /branches/12/rest-api-templates/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 29 11:18:15 CDT 2013


Author: dlee
Date: Thu Aug 29 11:18:13 2013
New Revision: 397927

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=397927
Log:
Account for {} in Swagger notes

Modified:
    branches/12/rest-api-templates/api.wiki.mustache
    branches/12/rest-api-templates/asterisk_processor.py
    branches/12/rest-api-templates/make_ari_stubs.py

Modified: branches/12/rest-api-templates/api.wiki.mustache
URL: http://svnview.digium.com/svn/asterisk/branches/12/rest-api-templates/api.wiki.mustache?view=diff&rev=397927&r1=397926&r2=397927
==============================================================================
--- branches/12/rest-api-templates/api.wiki.mustache (original)
+++ branches/12/rest-api-templates/api.wiki.mustache Thu Aug 29 11:18:13 2013
@@ -13,7 +13,7 @@
 {anchor:{{nickname}}}
 h2. {{http_method}} {{wiki_path}}
 
-{{{summary}}}{{#notes}} {{{notes}}}{{/notes}}
+{{{summary}}}{{#wiki_notes}} {{{wiki_notes}}}{{/wiki_notes}}
 {{#has_path_parameters}}
 
 h3. Path parameters

Modified: branches/12/rest-api-templates/asterisk_processor.py
URL: http://svnview.digium.com/svn/asterisk/branches/12/rest-api-templates/asterisk_processor.py?view=diff&rev=397927&r1=397926&r2=397927
==============================================================================
--- branches/12/rest-api-templates/asterisk_processor.py (original)
+++ branches/12/rest-api-templates/asterisk_processor.py Thu Aug 29 11:18:13 2013
@@ -187,6 +187,7 @@
         operation.c_http_method = 'AST_HTTP_' + operation.http_method
         if not operation.summary.endswith("."):
             raise SwaggerError("Summary should end with .", context)
+        operation.wiki_notes = wikify(operation.notes or "")
 
     def process_parameter(self, parameter, context):
         if not parameter.data_type in self.type_mapping:

Modified: branches/12/rest-api-templates/make_ari_stubs.py
URL: http://svnview.digium.com/svn/asterisk/branches/12/rest-api-templates/make_ari_stubs.py?view=diff&rev=397927&r1=397926&r2=397927
==============================================================================
--- branches/12/rest-api-templates/make_ari_stubs.py (original)
+++ branches/12/rest-api-templates/make_ari_stubs.py Thu Aug 29 11:18:13 2013
@@ -16,13 +16,15 @@
 # at the top of the source tree.
 #
 
+import sys
+
 try:
     import pystache
 except ImportError:
     print >> sys.stderr, "Pystache required. Please sudo pip install pystache."
+    sys.exit(1)
 
 import os.path
-import sys
 
 from asterisk_processor import AsteriskProcessor
 from optparse import OptionParser




More information about the asterisk-commits mailing list