Commit Graph

13 Commits

Author SHA1 Message Date
George Joseph c06f938851 ari-stubs: Fix broken documentation anchors
All of the links that reference page anchors with capital letters in
the ids (#Something) have been changed to lower case to match the
anchors that are generated by mkdocs.
2023-09-05 09:55:49 -06:00
George Joseph 80d042cb01 rest-api: Updates for new documentation site
The new documentation site uses traditional markdown instead
of the Confluence flavored version.  This required changes in
the mustache templates and the python that generates the files.
2023-06-27 08:37:16 -06:00
Ben Ford db7b025532 Update AMI and ARI versions for Asterisk 20.
Bumped AMI and ARI versions for the next major Asterisk version (20).

Change-Id: I2e65794f206d443178ab6895767fb53f04cc3e6a
2021-08-02 10:58:44 -05:00
George Joseph 9c3b57822a Prepare master for the next Asterisk version
* Updated AMI version to 8.0.0
* Updated ARI version to 7.0.0
* Update make_ari_stubs.py to "Asterisk 19"

Change-Id: I51fb38c2e29f2db785f64a8bbd5565d56bea5af5
2020-07-21 07:37:23 -05:00
George Joseph 8d10028b98 Update master for Asterisk 18
Change-Id: I8b8ed97001446fab0c14d7c89391ee572fb29dd6
2019-07-29 10:04:48 -06:00
Joshua Colp e01e636959 Update UPDATE.txt for 16 and update ARI stubs.
Copied UPGRADE.txt -> UPGRADE-16.txt
Created new UPGRADE.txt

Updated ARI stubs version to 17.

Change-Id: I4210e53f8022a2a68c7653595bdd13fbebac41ee
2018-07-18 19:23:02 +00:00
Corey Farrell 879e592baf Build System: Enable python3 compatibility.
* Consistently use spaces in rest-api-templates/asterisk_processor.py.
* Exclude third-party from docs/full-en_US.xml.
* Add docs/full-en_US.xml to .gitignore.
* Use list() to convert python3 view.
* Use python3 print function.
* Replace cmp() with equivalent equation.
* Replace reference to out of scope subtype variable with name
  parameter.
* Use unescaping triple bracket notation in mustache templates where
  needed.  This causes behavior of Python2 to be maintained when using
  Python3.
* Fix references to has_websocket / is_websocket in
  res_ari_resource.c.mustache.
* Update calculation of has_websocket to use any().
* Use unicode mode for writing output file in transform.py.
* Replace 'from swagger_model import *' with explicit import of required
  symbols.

I have not tested spandspflow2pcap.py or voicemailpwcheck.py, only the
print syntax has been fixed.

Change-Id: If5c5b556a2800d41a3e2cfef080ac2e151178c33
2018-04-09 10:07:38 -04:00
George Joseph 063c9a935f Update make_ari_stubs in master to make the version 16
Ready for next major version

Change-Id: If9dc99b3b78768529e69a297d8f87e23582ca6d0
2017-07-21 10:41:20 -06:00
Matthew Jordan 86e927a714 make_ari_stubs: Update wiki prefix to '13'
........

Merged revisions 420538 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-08 12:40:16 +00:00
David M. Lee dfb0144d0c ari: Fix generators for resources with camelCase names.
For the new deviceState resource, we need to properly generate
device_state.[ch] files.
........

Merged revisions 402981 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21 21:22:26 +00:00
David M. Lee 417230848f Account for {} in Swagger notes
........

Merged revisions 397927 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29 16:21:31 +00:00
Kinsey Moore d8956f690e Rename everything Stasis-HTTP to ARI
This renames all files and API calls from several variants of
Stasis-HTTP to ARI including:
* Stasis-HTTP -> ARI
* STASIS_HTTP -> ARI
* stasis_http -> ari (ast_ari for global symbols, file names as well)
* stasis http -> ARI

Review: https://reviewboard.asterisk.org/r/2706/
(closes issue ASTERISK-22136)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-27 23:11:02 +00:00
David M. Lee c9a3d4562d Update events to use Swagger 1.3 subtyping, and related aftermath
This patch started with the simple idea of changing the /events data
model to be more sane. The original model would send out events like:

    { "stasis_start": { "args": [], "channel": { ... } } }

The event discriminator was the field name instead of being a value in
the object, due to limitations in how Swagger 1.1 could model objects.
While technically sufficient in communicating event information, it was
really difficult to deal with in terms of client side JSON handling.

This patch takes advantage of a proposed extension[1] to Swagger which
allows type variance through the use of a discriminator field. This had
a domino effect that made this a surprisingly large patch.

 [1]: https://groups.google.com/d/msg/wordnik-api/EC3rGajE0os/ey_5dBI_jWcJ

In changing the models, I also had to change the swagger_model.py
processor so it can handle the type discriminator and subtyping. I took
that a big step forward, and using that information to generate an
ari_model module, which can validate a JSON object against the Swagger
model.

The REST and WebSocket generators were changed to take advantage of the
validators. If compiled with AST_DEVMODE enabled, JSON objects that
don't match their corresponding models will not be sent out. For REST
API calls, a 500 Internal Server response is sent. For WebSockets, the
invalid JSON message is replaced with an error message.

Since this took over about half of the job of the existing JSON
generators, and the .to_json virtual function on messages took over the
other half, I reluctantly removed the generators.

The validators turned up all sorts of errors and inconsistencies in our
data models, and the code. These were cleaned up, with checks in the
code generator avoid some of the consistency problems in the future.

 * The model for a channel snapshot was trimmed down to match the
   information sent via AMI. Many of the field being sent were not
   useful in the general case.
 * The model for a bridge snapshot was updated to be more consistent
   with the other ARI models.

Another impact of introducing subtyping was that the swagger-codegen
documentation generator was insufficient (at least until it catches up
with Swagger 1.2). I wanted it to be easier to generate docs for the API
anyways, so I ported the wiki pages to use the Asterisk Swagger
generator. In the process, I was able to clean up many of the model
links, which would occasionally give inconsistent results on the wiki. I
also added error responses to the wiki docs, making the wiki
documentation more complete.

Finally, since Stasis-HTTP will now be named Asterisk REST Interface
(ARI), any new functions and files I created carry the ari_ prefix. I
changed a few stasis_http references to ari where it was non-intrusive
and made sense.

(closes issue ASTERISK-21885)
Review: https://reviewboard.asterisk.org/r/2639/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 16:32:41 +00:00