diff --git a/rest-api-templates/api.wiki.mustache b/rest-api-templates/api.wiki.mustache index c70e58fc367092bce8b30ae258962bfc673f209a..a19e496e1198310815364c87d211671ce4f620d8 100644 --- a/rest-api-templates/api.wiki.mustache +++ b/rest-api-templates/api.wiki.mustache @@ -13,7 +13,7 @@ h1. {{name_title}} {anchor:{{nickname}}} h2. {{http_method}} {{wiki_path}} -{{{summary}}}{{#notes}} {{{notes}}}{{/notes}} +{{{summary}}}{{#wiki_notes}} {{{wiki_notes}}}{{/wiki_notes}} {{#has_path_parameters}} h3. Path parameters diff --git a/rest-api-templates/asterisk_processor.py b/rest-api-templates/asterisk_processor.py index 6f69b48659303827be03983ec85f6c3808e2dcc1..65013d3384721219e31ac8a9c0995d39fd857b25 100644 --- a/rest-api-templates/asterisk_processor.py +++ b/rest-api-templates/asterisk_processor.py @@ -187,6 +187,7 @@ class AsteriskProcessor(SwaggerPostProcessor): 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: diff --git a/rest-api-templates/make_ari_stubs.py b/rest-api-templates/make_ari_stubs.py index 8058862fd2e549174ef96dbcbd128c9325fc5d3f..a08b9bfa83151b23d1c51c89b03c52c12baef603 100755 --- a/rest-api-templates/make_ari_stubs.py +++ b/rest-api-templates/make_ari_stubs.py @@ -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