fccb427c88
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. (closes issue ASTERISK-22685) Review: https://reviewboard.asterisk.org/r/2994/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403177 65c4cc65-6c06-0410-ace0-fbb531ad65f3 |
||
---|---|---|
.. | ||
README.txt | ||
api.wiki.mustache | ||
ari.make.mustache | ||
ari_model_validators.c.mustache | ||
ari_model_validators.h.mustache | ||
ari_resource.c.mustache | ||
ari_resource.h.mustache | ||
asterisk_processor.py | ||
do-not-edit.mustache | ||
make_ari_stubs.py | ||
models.wiki.mustache | ||
odict.py | ||
param_cleanup.mustache | ||
param_parsing.mustache | ||
res_ari_resource.c.mustache | ||
rest_handler.mustache | ||
swagger_model.py | ||
transform.py |
README.txt
This directory contains templates and template processing code for generating HTTP bindings for the RESTful API's. The RESTful API's are declared using [Swagger][swagger]. While Swagger provides a [code generating toolkit][swagger-codegen], it requires Java to run, which would be an unusual dependency to require for Asterisk developers. This code generator is similar, but written in Python. Templates are processed by using [pystache][pystache], which is a fairly simply Python implementation of [mustache][mustache]. [swagger]: https://github.com/wordnik/swagger-core/wiki [swagger-codegen]: https://github.com/wordnik/swagger-codegen [pystache]: https://github.com/defunkt/pystache [mustache]: http://mustache.github.io/