[asterisk-dev] [Code Review] 2940: ARI: User better nicknames for ARI operations

David Lee reviewboard at asterisk.org
Wed Oct 30 17:08:57 CDT 2013



> On Oct. 28, 2013, 10:46 a.m., opticron wrote:
> > /branches/12/rest-api/api-docs/recordings.json, lines 182-189
> > <https://reviewboard.asterisk.org/r/2940/diff/2/?file=47351#file47351line182>
> >
> >     Is there any reason that this isn't using DELETE like the other state toggles (hold, MOH, etc.)?
> 
> David Lee wrote:
>     That was probably missed when we made those changes. It's small enough, I'll include it in this patch.
> 
> Paul Belanger wrote:
>     So the reason we didn't change these before, was we never did decide if a DELETE with parameters was valid.  There is still a discussion going on about IIRC.

These deletes don't have query parameters, so the patch is still valid.


- David


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


On Oct. 29, 2013, 2:02 p.m., David Lee wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2940/
> -----------------------------------------------------------
> 
> (Updated Oct. 29, 2013, 2:02 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> While working on building client libraries from the Swagger API, I
> noticed a problem with the nicknames.
> 
>     channel.deleteChannel()
>     channel.answerChannel()
>     channel.muteChannel()
> 
> Etc. We put the object name in the nickname (since we were generating C
> code), but it makes OO generators redundant.
> 
> This patch makes the nicknames more OO friendly. This resulted in a lot
> of name changing within the res_ari_*.so modules, but not much else.
> 
> There were a couple of other fixed I made in the process.
> 
>  * When reversible operations (POST /hold, POST /unhold) were made more
>    RESTful (POST /hold, DELETE /unhold), the path for the second operation
>    was left in the API declaration. This worked, but really the two
>    operations should have been on the same API.
>  * The POST /unmute operation had still not been REST-ified.
> 
> 
> Diffs
> -----
> 
>   /branches/12/rest-api/api-docs/sounds.json 401260 
>   /branches/12/rest-api/api-docs/recordings.json 401260 
>   /branches/12/rest-api/api-docs/playback.json 401260 
>   /branches/12/rest-api/api-docs/endpoints.json 401260 
>   /branches/12/rest-api/api-docs/channels.json 401260 
>   /branches/12/rest-api/api-docs/bridges.json 401260 
>   /branches/12/rest-api/api-docs/asterisk.json 401260 
>   /branches/12/rest-api/api-docs/applications.json 401260 
>   /branches/12/rest-api-templates/swagger_model.py 401260 
>   /branches/12/rest-api-templates/rest_handler.mustache 401260 
>   /branches/12/rest-api-templates/res_ari_resource.c.mustache 401260 
>   /branches/12/rest-api-templates/asterisk_processor.py 401260 
>   /branches/12/rest-api-templates/ari_resource.h.mustache 401260 
>   /branches/12/rest-api-templates/ari_resource.c.mustache 401260 
>   /branches/12/res/res_ari_sounds.c 401260 
>   /branches/12/res/res_ari_recordings.c 401260 
>   /branches/12/res/res_ari_playback.c 401260 
>   /branches/12/res/res_ari_events.c 401260 
>   /branches/12/res/res_ari_endpoints.c 401260 
>   /branches/12/res/res_ari_channels.c 401260 
>   /branches/12/res/res_ari_bridges.c 401260 
>   /branches/12/res/res_ari_asterisk.c 401260 
>   /branches/12/res/res_ari_applications.c 401260 
>   /branches/12/res/ari/resource_sounds.c 401260 
>   /branches/12/res/ari/resource_sounds.h 401260 
>   /branches/12/res/ari/resource_recordings.c 401260 
>   /branches/12/res/ari/resource_recordings.h 401260 
>   /branches/12/res/ari/resource_playback.c 401260 
>   /branches/12/res/ari/resource_playback.h 401260 
>   /branches/12/res/ari/resource_events.c 401260 
>   /branches/12/res/ari/resource_events.h 401260 
>   /branches/12/res/ari/resource_endpoints.c 401260 
>   /branches/12/res/ari/resource_endpoints.h 401260 
>   /branches/12/res/ari/resource_channels.c 401260 
>   /branches/12/res/ari/resource_channels.h 401260 
>   /branches/12/res/ari/resource_bridges.c 401260 
>   /branches/12/res/ari/resource_bridges.h 401260 
>   /branches/12/res/ari/resource_asterisk.c 401260 
>   /branches/12/res/ari/resource_asterisk.h 401260 
>   /branches/12/res/ari/resource_applications.c 401260 
>   /branches/12/res/ari/resource_applications.h 401260 
> 
> Diff: https://reviewboard.asterisk.org/r/2940/diff/
> 
> 
> Testing
> -------
> 
> Hit each ARI resource to ensure it still responded.
> 
> 
> Thanks,
> 
> David Lee
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131030/4c2e2789/attachment.html>


More information about the asterisk-dev mailing list