6691606723
The 'ari set debug' command has been enhanced to accept 'all' as an
application name. This allows dumping of all apps even if an app
hasn't registered yet. To accomplish this, a new global_debug global
variable was added to res/stasis/app.c and new APIs were added to
set and query the value.
'ari set debug' now displays requests and responses as well as events.
This required refactoring the existing debug code.
* The implementation for 'ari set debug' was moved from stasis/cli.{c,h}
to ari/cli.{c,h}, and stasis/cli.{c,h} were deleted.
* In order to print the body of incoming requests even if a request
failed, the consumption of the body was moved from the ari stubs
to ast_ari_callback in res_ari.c and the moustache templates were
then regenerated. The body is now passed to ast_ari_invoke and then
on to the handlers. This results in code savings since that template
was inserted multiple times into all the stubs.
An additional change was made to the ao2_str_container implementation
to add partial key searching and a sort function. The existing cli
code assumed it was already there when it wasn't so the tab completion
was never working.
Change-Id: Ief936f747ce47f1fb14035fbe61152cf766406bf
(cherry picked from commit
|
||
---|---|---|
.. | ||
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 | ||
body_parsing.mustache | ||
do-not-edit.mustache | ||
make_ari_stubs.py | ||
models.wiki.mustache | ||
odict.py | ||
param_cleanup.mustache | ||
param_parsing.mustache | ||
README.txt | ||
res_ari_resource.c.mustache | ||
rest_handler.mustache | ||
swagger_model.py | ||
transform.py |
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/