[asterisk-commits] dlee: trunk r400852 - in /trunk: ./ res/ res/ari/ rest-api-templates/ rest-ap...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Oct 11 11:36:02 CDT 2013
Author: dlee
Date: Fri Oct 11 11:36:00 2013
New Revision: 400852
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400852
Log:
Multiple revisions 400508,400842-400843,400848
........
r400508 | dlee | 2013-10-03 23:54:51 -0500 (Thu, 03 Oct 2013) | 1 line
Corrected response class for stopPlayback
........
r400842 | dlee | 2013-10-10 14:23:24 -0500 (Thu, 10 Oct 2013) | 1 line
Correct some ARI wiki rendering errors
........
r400843 | dlee | 2013-10-10 14:26:19 -0500 (Thu, 10 Oct 2013) | 1 line
Updated /play resource docs. The playback of http: resources isn't implemented... yet
........
r400848 | dlee | 2013-10-11 11:18:46 -0500 (Fri, 11 Oct 2013) | 5 lines
Fix a stupid copy/paste error in ARI docs.
Patches:
ari-doc-patch.txt uploaded by jbigelow (license 5091)
........
Merged revisions 400508,400842-400843,400848 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/res/ari/resource_bridges.h
trunk/res/ari/resource_channels.h
trunk/res/ari/resource_playback.h
trunk/res/res_ari_playback.c
trunk/rest-api-templates/api.wiki.mustache
trunk/rest-api-templates/asterisk_processor.py
trunk/rest-api-templates/models.wiki.mustache
trunk/rest-api/api-docs/bridges.json
trunk/rest-api/api-docs/channels.json
trunk/rest-api/api-docs/playback.json
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/res/ari/resource_bridges.h
URL: http://svnview.digium.com/svn/asterisk/trunk/res/ari/resource_bridges.h?view=diff&rev=400852&r1=400851&r2=400852
==============================================================================
--- trunk/res/ari/resource_bridges.h (original)
+++ trunk/res/ari/resource_bridges.h Fri Oct 11 11:36:00 2013
@@ -179,7 +179,7 @@
/*!
* \brief Start playback of media on a bridge.
*
- * The media URI may be any of a number of URI's. You may use http: and https: URI's, as well as sound: and recording: URI's. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
+ * The media URI may be any of a number of URI's. Currently sound: and recording: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
*
* \param headers HTTP headers
* \param args Swagger parameters
Modified: trunk/res/ari/resource_channels.h
URL: http://svnview.digium.com/svn/asterisk/trunk/res/ari/resource_channels.h?view=diff&rev=400852&r1=400851&r2=400852
==============================================================================
--- trunk/res/ari/resource_channels.h (original)
+++ trunk/res/ari/resource_channels.h Fri Oct 11 11:36:00 2013
@@ -260,7 +260,7 @@
/*!
* \brief Start playback of media.
*
- * The media URI may be any of a number of URI's. You may use http: and https: URI's, as well as sound: and recording: URI's. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
+ * The media URI may be any of a number of URI's. Currently sound: and recording: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
*
* \param headers HTTP headers
* \param args Swagger parameters
Modified: trunk/res/ari/resource_playback.h
URL: http://svnview.digium.com/svn/asterisk/trunk/res/ari/resource_playback.h?view=diff&rev=400852&r1=400851&r2=400852
==============================================================================
--- trunk/res/ari/resource_playback.h (original)
+++ trunk/res/ari/resource_playback.h Fri Oct 11 11:36:00 2013
@@ -73,7 +73,7 @@
const char *operation;
};
/*!
- * \brief Get a playback's details.
+ * \brief Control a playback.
*
* \param headers HTTP headers
* \param args Swagger parameters
Modified: trunk/res/res_ari_playback.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_ari_playback.c?view=diff&rev=400852&r1=400851&r2=400852
==============================================================================
--- trunk/res/res_ari_playback.c (original)
+++ trunk/res/res_ari_playback.c Fri Oct 11 11:36:00 2013
@@ -145,7 +145,7 @@
break;
default:
if (200 <= code && code <= 299) {
- is_valid = ast_ari_validate_playback(
+ is_valid = ast_ari_validate_void(
response->message);
} else {
ast_log(LOG_ERROR, "Invalid error response %d for /playback/{playbackId}\n", code);
Modified: trunk/rest-api-templates/api.wiki.mustache
URL: http://svnview.digium.com/svn/asterisk/trunk/rest-api-templates/api.wiki.mustache?view=diff&rev=400852&r1=400851&r2=400852
==============================================================================
--- trunk/rest-api-templates/api.wiki.mustache (original)
+++ trunk/rest-api-templates/api.wiki.mustache Fri Oct 11 11:36:00 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: trunk/rest-api-templates/asterisk_processor.py
URL: http://svnview.digium.com/svn/asterisk/trunk/rest-api-templates/asterisk_processor.py?view=diff&rev=400852&r1=400851&r2=400852
==============================================================================
--- trunk/rest-api-templates/asterisk_processor.py (original)
+++ trunk/rest-api-templates/asterisk_processor.py Fri Oct 11 11:36:00 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: trunk/rest-api-templates/models.wiki.mustache
URL: http://svnview.digium.com/svn/asterisk/trunk/rest-api-templates/models.wiki.mustache?view=diff&rev=400852&r1=400851&r2=400852
==============================================================================
--- trunk/rest-api-templates/models.wiki.mustache (original)
+++ trunk/rest-api-templates/models.wiki.mustache Fri Oct 11 11:36:00 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}}
Modified: trunk/rest-api/api-docs/bridges.json
URL: http://svnview.digium.com/svn/asterisk/trunk/rest-api/api-docs/bridges.json?view=diff&rev=400852&r1=400851&r2=400852
==============================================================================
--- trunk/rest-api/api-docs/bridges.json (original)
+++ trunk/rest-api/api-docs/bridges.json Fri Oct 11 11:36:00 2013
@@ -278,7 +278,7 @@
{
"httpMethod": "POST",
"summary": "Start playback of media on a bridge.",
- "notes": "The media URI may be any of a number of URI's. You may use http: and https: URI's, as well as sound: and recording: URI's. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)",
+ "notes": "The media URI may be any of a number of URI's. Currently sound: and recording: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)",
"nickname": "playOnBridge",
"responseClass": "Playback",
"parameters": [
Modified: trunk/rest-api/api-docs/channels.json
URL: http://svnview.digium.com/svn/asterisk/trunk/rest-api/api-docs/channels.json?view=diff&rev=400852&r1=400851&r2=400852
==============================================================================
--- trunk/rest-api/api-docs/channels.json (original)
+++ trunk/rest-api/api-docs/channels.json Fri Oct 11 11:36:00 2013
@@ -544,7 +544,7 @@
{
"httpMethod": "POST",
"summary": "Start playback of media.",
- "notes": "The media URI may be any of a number of URI's. You may use http: and https: URI's, as well as sound: and recording: URI's. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)",
+ "notes": "The media URI may be any of a number of URI's. Currently sound: and recording: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)",
"nickname": "playOnChannel",
"responseClass": "Playback",
"parameters": [
Modified: trunk/rest-api/api-docs/playback.json
URL: http://svnview.digium.com/svn/asterisk/trunk/rest-api/api-docs/playback.json?view=diff&rev=400852&r1=400851&r2=400852
==============================================================================
--- trunk/rest-api/api-docs/playback.json (original)
+++ trunk/rest-api/api-docs/playback.json Fri Oct 11 11:36:00 2013
@@ -31,7 +31,7 @@
"httpMethod": "DELETE",
"summary": "Stop a playback.",
"nickname": "stopPlayback",
- "responseClass": "Playback",
+ "responseClass": "void",
"parameters": [
{
"name": "playbackId",
@@ -51,7 +51,7 @@
"operations": [
{
"httpMethod": "POST",
- "summary": "Get a playback's details.",
+ "summary": "Control a playback.",
"nickname": "controlPlayback",
"responseClass": "void",
"parameters": [
More information about the asterisk-commits
mailing list