summaryrefslogtreecommitdiff
path: root/rest-api-templates
AgeCommit message (Collapse)Author
2013-05-21Merge in the bridge_construction branch to make the system use the Bridging API.Richard Mudgett
Breaks many things until they can be reworked. A partial list: chan_agent chan_dahdi, chan_misdn, chan_iax2 native bridging app_queue COLP updates DTMF attended transfers Protocol attended transfers git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-14Move JSON event generators into separate modulesKinsey Moore
This moves the JSON event generators out of the Stasis-HTTP modules and into standalone JSON-related counterparts so that Stasis-HTTP and res_stasis can depend on them without creating dependency cycles. This also provides a future location for Swagger Model validator functions once the generators for that code are written. Review: https://reviewboard.asterisk.org/r/2534/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-10Address unload order issues for res_stasis* modulesDavid M. Lee
I've noticed when doing a graceful shutdown that the res_stasis_http.so module gets unloaded before the modules that use it, which causes some asserts during their unload. While r386928 was a quick hack to get it to not assert and die, this patch increases the use counts on res_stasis.so and res_stasis_http.so properly. It's a bigger change than I expected, hence the review instead of just committing it. Review: https://reviewboard.asterisk.org/r/2489/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-10Add channel events for res_stasis appsKinsey Moore
This change adds a framework in res_stasis for handling events from channel topics. JSON event generation and validation code is created from event documentation in rest-api/api-docs/events.json to assist in JSON event generation, ensure consistency, and ensure that accurate documentation is available for ALL events that are received by res_stasis applications. The userevent application has been refactored along with the code that handles userevent channel blob events to pass the headers as key/value pairs in the JSON blob. As a side-effect, app_userevent now handles duplicate keys by overwriting the previous value. Review: https://reviewboard.asterisk.org/r/2428/ (closes issue ASTERISK-21180) Patch-By: Kinsey Moore <kmoore@digium.com> git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-28Fix spelling error in python docKinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-24Document JSON models in resource_*.hDavid M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-24Oops. Mustache doesn't like dictionariesDavid M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-22This patch adds a RESTful HTTP interface to Asterisk.David M. Lee
The API itself is documented using Swagger, a lightweight mechanism for documenting RESTful API's using JSON. This allows us to use swagger-ui to provide executable documentation for the API, generate client bindings in different languages, and generate a lot of the boilerplate code for implementing the RESTful bindings. The API docs live in the rest-api/ directory. The RESTful bindings are generated from the Swagger API docs using a set of Mustache templates. The code generator is written in Python, and uses Pystache. Pystache has no dependencies, and be installed easily using pip. Code generation code lives in rest-api-templates/. The generated code reduces a lot of boilerplate when it comes to handling HTTP requests. It also helps us have greater consistency in the REST API. (closes issue ASTERISK-20891) Review: https://reviewboard.asterisk.org/r/2376/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386232 65c4cc65-6c06-0410-ace0-fbb531ad65f3