Skip to content
Snippets Groups Projects
Commit 41723084 authored by David M. Lee's avatar David M. Lee
Browse files

Account for {} in Swagger notes

........

Merged revisions 397927 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 3f0148cd
Branches
Tags
No related merge requests found
...@@ -13,7 +13,7 @@ h1. {{name_title}} ...@@ -13,7 +13,7 @@ h1. {{name_title}}
{anchor:{{nickname}}} {anchor:{{nickname}}}
h2. {{http_method}} {{wiki_path}} h2. {{http_method}} {{wiki_path}}
{{{summary}}}{{#notes}} {{{notes}}}{{/notes}} {{{summary}}}{{#wiki_notes}} {{{wiki_notes}}}{{/wiki_notes}}
{{#has_path_parameters}} {{#has_path_parameters}}
h3. Path parameters h3. Path parameters
......
...@@ -187,6 +187,7 @@ class AsteriskProcessor(SwaggerPostProcessor): ...@@ -187,6 +187,7 @@ class AsteriskProcessor(SwaggerPostProcessor):
operation.c_http_method = 'AST_HTTP_' + operation.http_method operation.c_http_method = 'AST_HTTP_' + operation.http_method
if not operation.summary.endswith("."): if not operation.summary.endswith("."):
raise SwaggerError("Summary should end with .", context) raise SwaggerError("Summary should end with .", context)
operation.wiki_notes = wikify(operation.notes or "")
def process_parameter(self, parameter, context): def process_parameter(self, parameter, context):
if not parameter.data_type in self.type_mapping: if not parameter.data_type in self.type_mapping:
......
...@@ -16,13 +16,15 @@ ...@@ -16,13 +16,15 @@
# at the top of the source tree. # at the top of the source tree.
# #
import sys
try: try:
import pystache import pystache
except ImportError: except ImportError:
print >> sys.stderr, "Pystache required. Please sudo pip install pystache." print >> sys.stderr, "Pystache required. Please sudo pip install pystache."
sys.exit(1)
import os.path import os.path
import sys
from asterisk_processor import AsteriskProcessor from asterisk_processor import AsteriskProcessor
from optparse import OptionParser from optparse import OptionParser
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment