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

David Lee reviewboard at asterisk.org
Thu Jul 25 15:24:09 CDT 2013


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

Review request for Asterisk Developers and jrose.


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
-----

  /trunk/res/res_stasis_http_asterisk.c 395454 
  /trunk/res/res_stasis_http_bridges.c 395454 
  /trunk/res/res_stasis_http_channels.c 395454 
  /trunk/res/res_stasis_http_endpoints.c 395454 
  /trunk/res/res_stasis_http_events.c 395454 
  /trunk/res/res_stasis_http_playback.c 395454 
  /trunk/res/res_stasis_http_recordings.c 395454 
  /trunk/res/res_stasis_http_sounds.c 395454 
  /trunk/res/stasis_http/resource_asterisk.h 395454 
  /trunk/res/stasis_http/resource_bridges.h 395454 
  /trunk/res/stasis_http/resource_bridges.c 395454 
  /trunk/res/stasis_http/resource_events.h 395454 
  /trunk/res/stasis_http/resource_events.c 395454 
  /trunk/res/stasis_http/resource_sounds.h 395454 
  /trunk/rest-api-templates/param_cleanup.mustache PRE-CREATION 
  /trunk/rest-api-templates/param_parsing.mustache 395454 
  /trunk/rest-api-templates/res_stasis_http_resource.c.mustache 395454 
  /trunk/rest-api-templates/stasis_http_resource.h.mustache 395454 
  /trunk/rest-api/api-docs/bridges.json 395454 
  /trunk/rest-api/api-docs/channels.json 395454 
  /trunk/rest-api/api-docs/events.json 395454 

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/20130725/33ecfce0/attachment.htm>


More information about the asterisk-dev mailing list