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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 10 14:23:26 CDT 2013


Author: dlee
Date: Thu Oct 10 14:23:24 2013
New Revision: 400842

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400842
Log:
Correct some ARI wiki rendering errors

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

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=400842&r1=400841&r2=400842
==============================================================================
--- branches/12/rest-api-templates/api.wiki.mustache (original)
+++ branches/12/rest-api-templates/api.wiki.mustache Thu Oct 10 14:23:24 2013
@@ -13,26 +13,26 @@
 {anchor:{{nickname}}}
 h2. {{http_method}} {{wiki_path}}
 
-{{{summary}}}{{#wiki_notes}} {{{wiki_notes}}}{{/wiki_notes}}
+{{{wiki_summary}}}{{#wiki_notes}} {{{wiki_notes}}}{{/wiki_notes}}
 {{#has_path_parameters}}
 
 h3. Path parameters
 {{#path_parameters}}
-* {{name}}: {{data_type}}{{#default_value}} = {{default_value}}{{/default_value}} - {{description}}
+* {{name}}: {{data_type}}{{#default_value}} = {{default_value}}{{/default_value}} - {{{wiki_description}}}
 {{/path_parameters}}
 {{/has_path_parameters}}
 {{#has_query_parameters}}
 
 h3. Query parameters
 {{#query_parameters}}
-* {{name}}: {{data_type}}{{#default_value}} = {{default_value}}{{/default_value}} -{{#required}} *(required)*{{/required}} {{description}}
+* {{name}}: {{data_type}}{{#default_value}} = {{default_value}}{{/default_value}} -{{#required}} *(required)*{{/required}} {{{wiki_description}}}
 {{/query_parameters}}
 {{/has_query_parameters}}
 {{#has_header_parameters}}
 
 h3. Header parameters
 {{#header_parameters}}
-* {{name}}: {{data_type}}{{#default_value}} = {{default_value}}{{/default_value}} -{{#required}} *(required)*{{/required}} {{description}}
+* {{name}}: {{data_type}}{{#default_value}} = {{default_value}}{{/default_value}} -{{#required}} *(required)*{{/required}} {{{wiki_description}}}
 {{/header_parameters}}
 {{/has_header_parameters}}
 {{#has_error_responses}}

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=400842&r1=400841&r2=400842
==============================================================================
--- branches/12/rest-api-templates/asterisk_processor.py (original)
+++ branches/12/rest-api-templates/asterisk_processor.py Thu Oct 10 14:23:24 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_summary = wikify(operation.summary or "")
         operation.wiki_notes = wikify(operation.notes or "")
 
     def process_parameter(self, parameter, context):
@@ -202,10 +203,12 @@
             parameter.c_space = ''
         else:
             parameter.c_space = ' '
+        parameter.wiki_description = wikify(parameter.description)
 
     def process_model(self, model, context):
         model.description_dox = model.description.replace('\n', '\n * ')
         model.description_dox = re.sub(' *\n', '\n', model.description_dox)
+        model.wiki_description = wikify(model.description)
         model.c_id = snakify(model.id)
         return model
 

Modified: branches/12/rest-api-templates/models.wiki.mustache
URL: http://svnview.digium.com/svn/asterisk/branches/12/rest-api-templates/models.wiki.mustache?view=diff&rev=400842&r1=400841&r2=400842
==============================================================================
--- branches/12/rest-api-templates/models.wiki.mustache (original)
+++ branches/12/rest-api-templates/models.wiki.mustache Thu Oct 10 14:23:24 2013
@@ -6,15 +6,15 @@
 h1. {{id}}
 {{#extends}}Base type: [{{extends}}|#{{extends}}]{{/extends}}
 {{#has_subtypes}}Subtypes:{{#subtypes}} [{{id}}|#{{id}}]{{/subtypes}}{{/has_subtypes}}
-{{#description}}
+{{#wiki_description}}
 
-{{{description}}}
-{{/description}}
+{{{wiki_description}}}
+{{/wiki_description}}
 {code:language=javascript|collapse=true}
 {{{model_json}}}
 {code}
 {{#properties}}
-* {{name}}: {{#type}}{{#is_primitive}}{{wiki_name}}{{/is_primitive}}{{^is_primitive}}[{{wiki_name}}|#{{singular_name}}]{{/is_primitive}}{{/type}}{{^required}} _(optional)_{{/required}}{{#description}} - {{{description}}}{{/description}}
+* {{name}}: {{#type}}{{#is_primitive}}{{wiki_name}}{{/is_primitive}}{{^is_primitive}}[{{wiki_name}}|#{{singular_name}}]{{/is_primitive}}{{/type}}{{^required}} _(optional)_{{/required}}{{#wiki_description}} - {{{wiki_description}}}{{/wiki_description}}
 {{/properties}}
 
 {{/models}}




More information about the asterisk-commits mailing list