[asterisk-dev] [Code Review] 2994: ari:Add application/json parameter support
David Lee
reviewboard at asterisk.org
Wed Nov 27 09:39:29 CST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2994/
-----------------------------------------------------------
(Updated Nov. 27, 2013, 9:39 a.m.)
Status
------
This change has been marked as submitted.
Review request for Asterisk Developers and Paul Belanger.
Changes
-------
Committed in revision 403175
Bugs: ASTERISK-22685
https://issues.asterisk.org/jira/browse/ASTERISK-22685
Repository: Asterisk
Description
-------
The patch allows ARI to parse request parameters from an incoming JSON
request body, instead of requiring the request to come in as query
parameters (which is just weird for POST and DELETE) or form
parameters (which is okay, but a bit asymmetric given that all of our
responses are JSON).
For any operation that does _not_ have a parameter defined of type
body (i.e. "paramType": "body" in the API declaration), if a request
provides a request body with a Content type of "application/json", the
provided JSON document is parsed and searched for parameters.
The expected fields in the provided JSON document should match the
query parameters defined for the operation. If the parameter has
'allowMultiple' set, then the field in the JSON document may
optionally be an array of values.
Diffs
-----
/branches/12/tests/test_ari.c 402455
/branches/12/rest-api-templates/swagger_model.py 402455
/branches/12/rest-api-templates/res_ari_resource.c.mustache 402455
/branches/12/rest-api-templates/param_parsing.mustache 402455
/branches/12/rest-api-templates/asterisk_processor.py 402455
/branches/12/res/res_ari_sounds.c 402455
/branches/12/res/res_ari_recordings.c 402455
/branches/12/res/res_ari_playback.c 402455
/branches/12/res/res_ari_endpoints.c 402455
/branches/12/res/res_ari_channels.c 402455
/branches/12/res/res_ari_bridges.c 402455
/branches/12/res/res_ari_asterisk.c 402455
/branches/12/res/res_ari_applications.c 402455
/branches/12/res/res_ari.c 402455
/branches/12/main/http.c 402455
/branches/12/include/asterisk/http.h 402455
/branches/12/include/asterisk/ari.h 402455
Diff: https://reviewboard.asterisk.org/r/2994/diff/
Testing
-------
Testsuite test.
See https://reviewboard.asterisk.org/r/2993/
Thanks,
David Lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131127/f4079008/attachment.html>
More information about the asterisk-dev
mailing list