summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/ari/resource_bridges.h2
-rw-r--r--res/ari/resource_channels.h2
-rw-r--r--res/ari/resource_playback.h2
-rw-r--r--res/res_ari_playback.c2
-rw-r--r--rest-api-templates/api.wiki.mustache8
-rw-r--r--rest-api-templates/asterisk_processor.py3
-rw-r--r--rest-api-templates/models.wiki.mustache8
-rw-r--r--rest-api/api-docs/bridges.json2
-rw-r--r--rest-api/api-docs/channels.json2
-rw-r--r--rest-api/api-docs/playback.json4
10 files changed, 19 insertions, 16 deletions
diff --git a/res/ari/resource_bridges.h b/res/ari/resource_bridges.h
index dd4575a73..573317122 100644
--- a/res/ari/resource_bridges.h
+++ b/res/ari/resource_bridges.h
@@ -179,7 +179,7 @@ struct ast_play_on_bridge_args {
/*!
* \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
diff --git a/res/ari/resource_channels.h b/res/ari/resource_channels.h
index e4dcc1b7d..699424efd 100644
--- a/res/ari/resource_channels.h
+++ b/res/ari/resource_channels.h
@@ -260,7 +260,7 @@ struct ast_play_on_channel_args {
/*!
* \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
diff --git a/res/ari/resource_playback.h b/res/ari/resource_playback.h
index c606a5caf..719997a00 100644
--- a/res/ari/resource_playback.h
+++ b/res/ari/resource_playback.h
@@ -73,7 +73,7 @@ struct ast_control_playback_args {
const char *operation;
};
/*!
- * \brief Get a playback's details.
+ * \brief Control a playback.
*
* \param headers HTTP headers
* \param args Swagger parameters
diff --git a/res/res_ari_playback.c b/res/res_ari_playback.c
index 55da058a8..e30800d08 100644
--- a/res/res_ari_playback.c
+++ b/res/res_ari_playback.c
@@ -145,7 +145,7 @@ static void ast_ari_stop_playback_cb(
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);
diff --git a/rest-api-templates/api.wiki.mustache b/rest-api-templates/api.wiki.mustache
index a19e496e1..ba3a3d18c 100644
--- a/rest-api-templates/api.wiki.mustache
+++ b/rest-api-templates/api.wiki.mustache
@@ -13,26 +13,26 @@ h1. {{name_title}}
{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}}
diff --git a/rest-api-templates/asterisk_processor.py b/rest-api-templates/asterisk_processor.py
index 65013d338..2ea552932 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_summary = wikify(operation.summary or "")
operation.wiki_notes = wikify(operation.notes or "")
def process_parameter(self, parameter, context):
@@ -202,10 +203,12 @@ class AsteriskProcessor(SwaggerPostProcessor):
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
diff --git a/rest-api-templates/models.wiki.mustache b/rest-api-templates/models.wiki.mustache
index e3d3eb95c..b2e742afc 100644
--- a/rest-api-templates/models.wiki.mustache
+++ b/rest-api-templates/models.wiki.mustache
@@ -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}}
diff --git a/rest-api/api-docs/bridges.json b/rest-api/api-docs/bridges.json
index 9f8af9e0e..640cf4c5d 100644
--- a/rest-api/api-docs/bridges.json
+++ b/rest-api/api-docs/bridges.json
@@ -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": [
diff --git a/rest-api/api-docs/channels.json b/rest-api/api-docs/channels.json
index b408d8b17..9d60b2b7c 100644
--- a/rest-api/api-docs/channels.json
+++ b/rest-api/api-docs/channels.json
@@ -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": [
diff --git a/rest-api/api-docs/playback.json b/rest-api/api-docs/playback.json
index 734abdbff..a195186f2 100644
--- a/rest-api/api-docs/playback.json
+++ b/rest-api/api-docs/playback.json
@@ -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": [