asterisk/rest-api-templates
George Joseph 6691606723 ari: Implement 'debug all' and request/response logging
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 1d890874f3)
2017-01-23 10:25:58 -07:00
..
README.txt This patch adds a RESTful HTTP interface to Asterisk. 2013-04-22 14:58:53 +00:00
api.wiki.mustache ari: Add documentation that path parameters are case-sensitive 2016-08-16 12:27:14 -05:00
ari.make.mustache Build System: Create Makefile macro MOD_ADD_SOURCE. 2015-04-14 12:53:03 -04:00
ari_model_validators.c.mustache Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
ari_model_validators.h.mustache ARI: Add subscription support 2013-10-04 16:01:48 +00:00
ari_resource.c.mustache Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
ari_resource.h.mustache ARI: Add the ability to download the media associated with a stored recording 2016-05-20 09:06:12 -05:00
asterisk_processor.py Fixes to various issues reported by pyflakes 2016-12-21 11:02:20 +02:00
body_parsing.mustache ARI: Support channel variables in originate 2014-01-21 14:27:21 +00:00
do-not-edit.mustache This patch adds a RESTful HTTP interface to Asterisk. 2013-04-22 14:58:53 +00:00
make_ari_stubs.py make_ari_stubs: Update wiki prefix to '13' 2014-08-08 12:40:16 +00:00
models.wiki.mustache The Swagger 1.2 specification for type extension ended up being 2013-10-24 20:48:17 +00:00
odict.py This patch adds a RESTful HTTP interface to Asterisk. 2013-04-22 14:58:53 +00:00
param_cleanup.mustache ARI - implement allowMultiple for parameters 2013-08-02 14:36:32 +00:00
param_parsing.mustache ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_ari_resource.c.mustache ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
rest_handler.mustache ari: User better nicknames for ARI operations 2013-11-07 21:10:31 +00:00
swagger_model.py Fixes to various issues reported by pyflakes 2016-12-21 11:02:20 +02:00
transform.py Fixes to various issues reported by pyflakes 2016-12-21 11:02:20 +02:00

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/