[asterisk-dev] [Code Review] 2698: ARI - implement allowMultiple for parameters

David Lee reviewboard at asterisk.org
Tue Jul 30 08:58:21 CDT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2698/
-----------------------------------------------------------

(Updated July 30, 2013, 8:58 a.m.)


Review request for Asterisk Developers and jrose.


Changes
-------

Added comment for get_sounds params.

Also adjusted the generator so that empty /*! */ comments won't be generated.


Repository: Asterisk


Description
-------

Swagger allows parameters to be specified as 'allowMultiple', meaning
that the parameter may be specified as a comma separated list of
values.

I had written some of the API docs using that, but promptly forgot
about implementing it. This patch finally fills in that gap.

The codegen template was updated to represent 'allowMultiple' fields
as array/size fields in the _args structs. It also parses the comma
separated list using ast_app_separate_args(), so quoted strings in the
argument will be handled properly.


Diffs (updated)
-----

  /trunk/res/ari/resource_asterisk.h 395729 
  /trunk/res/ari/resource_bridges.h 395729 
  /trunk/res/ari/resource_bridges.c 395729 
  /trunk/res/ari/resource_events.h 395729 
  /trunk/res/ari/resource_events.c 395729 
  /trunk/res/ari/resource_sounds.h 395729 
  /trunk/res/res_ari_asterisk.c 395729 
  /trunk/res/res_ari_bridges.c 395729 
  /trunk/res/res_ari_channels.c 395729 
  /trunk/res/res_ari_endpoints.c 395729 
  /trunk/res/res_ari_events.c 395729 
  /trunk/res/res_ari_playback.c 395729 
  /trunk/res/res_ari_recordings.c 395729 
  /trunk/res/res_ari_sounds.c 395729 
  /trunk/rest-api-templates/ari_resource.h.mustache 395729 
  /trunk/rest-api-templates/param_cleanup.mustache PRE-CREATION 
  /trunk/rest-api-templates/param_parsing.mustache 395729 
  /trunk/rest-api-templates/res_ari_resource.c.mustache 395729 
  /trunk/rest-api/api-docs/bridges.json 395729 
  /trunk/rest-api/api-docs/channels.json 395729 
  /trunk/rest-api/api-docs/events.json 395729 
  /trunk/rest-api/api-docs/sounds.json 395729 

Diff: https://reviewboard.asterisk.org/r/2698/diff/


Testing
-------

Lots of variations hitting the events websocket and adding channels to
bridges using comma separated lists.


Thanks,

David Lee

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130730/788dbda1/attachment.htm>


More information about the asterisk-dev mailing list