]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
ARI: Improvements to body parameters documentation
authorSam Galarneau <sgalarneau@digium.com>
Thu, 3 Jul 2014 16:07:43 +0000 (16:07 +0000)
committerSam Galarneau <sgalarneau@digium.com>
Thu, 3 Jul 2014 16:07:43 +0000 (16:07 +0000)
The variables body parameter under the originate and originate with id
operations of the channel resource showed invalid JSON in its description.

The variables body parameter under the userEvent operation of the event
resource made no mention that the custom key/value pairs should be wrapped
in a variables key in order to be added to the custom user event.

ASTERISK-23975 #close

Review: https://reviewboard.asterisk.org/r/3692/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@417878 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/ari/resource_channels.h
res/ari/resource_events.h
rest-api/api-docs/channels.json
rest-api/api-docs/events.json

index 315ec7868f0706875936b0165117814234e23286..104e1bdb371742ba8ad70952fcdde4d799ffcb10 100644 (file)
@@ -68,7 +68,7 @@ struct ast_ari_channels_originate_args {
        const char *caller_id;
        /*! Timeout (in seconds) before giving up dialing, or -1 for no timeout. */
        int timeout;
-       /*! The 'variables' key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { 'endpoint': 'SIP/Alice', 'variables': { 'CALLERID(name)': 'Alice' } } */
+       /*! The "variables" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice" } } */
        struct ast_json *variables;
        /*! The unique id to assign the channel on creation. */
        const char *channel_id;
@@ -129,7 +129,7 @@ struct ast_ari_channels_originate_with_id_args {
        const char *caller_id;
        /*! Timeout (in seconds) before giving up dialing, or -1 for no timeout. */
        int timeout;
-       /*! The 'variables' key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { 'endpoint': 'SIP/Alice', 'variables': { 'CALLERID(name)': 'Alice' } } */
+       /*! The "variables" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice" } } */
        struct ast_json *variables;
        /*! The unique id to assign the second channel when using local channels. */
        const char *other_channel_id;
index 021a5963631b3c3cdd9cf25ba45bf488eaa5e1a3..646cf9bfceb763fa27cc7f817bcd169b0871f12f 100644 (file)
@@ -68,7 +68,7 @@ struct ast_ari_events_user_event_args {
        size_t source_count;
        /*! Parsing context for source. */
        char *source_parse;
-       /*! custom key/value pairs added to the user event */
+       /*! The "variables" key in the body object holds custom key/value pairs to add to the user event. Ex. { "variables": { "key": "value" } } */
        struct ast_json *variables;
 };
 /*!
index 997c345010983a290daf97d0e85213441dd592a5..96dbebd7d3b805d9b95220949c1120cd751b517c 100644 (file)
@@ -91,7 +91,7 @@
                                                },
                                                {
                                                        "name": "variables",
-                                                       "description": "The 'variables' key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { 'endpoint': 'SIP/Alice', 'variables': { 'CALLERID(name)': 'Alice' } }",
+                                                       "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }",
                                                        "paramType": "body",
                                                        "required": false,
                                                        "dataType": "containers",
                                                },
                                                {
                                                        "name": "variables",
-                                                       "description": "The 'variables' key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { 'endpoint': 'SIP/Alice', 'variables': { 'CALLERID(name)': 'Alice' } }",
+                                                       "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }",
                                                        "paramType": "body",
                                                        "required": false,
                                                        "dataType": "containers",
index a6879e8582bd1e8d6328ed2d803da4a23514b475..3d07e36131da824b95d0483296941a2c288d98ba 100644 (file)
@@ -67,7 +67,7 @@
                                                },
                                                {
                                                        "name": "variables",
-                                                       "description": "custom key/value pairs added to the user event",
+                                                       "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }",
                                                        "paramType": "body",
                                                        "required": false,
                                                        "allowMultiple": false,