[asterisk-bugs] [JIRA] (ASTERISK-25406) Misc anomalies in Swagger definitions

Sean Bright (JIRA) noreply at issues.asterisk.org
Mon Sep 21 09:34:33 CDT 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=227631#comment-227631 ] 

Sean Bright commented on ASTERISK-25406:
----------------------------------------

I've attached the work-in-progress Swagger 2.0 spec for ARI. There are some things to clean up, like unique operationIds for everything. I don't have a lot of time to work on this at the moment, so I'd be fine with someone else running with it.

> Misc anomalies in Swagger definitions
> -------------------------------------
>
>                 Key: ASTERISK-25406
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25406
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: Resources/res_ari
>    Affects Versions: 13.5.0
>            Reporter: Lorenzo Emilitri
>            Severity: Minor
>         Attachments: swagger.json
>
>
> I am rewriting the parser that generates ari4java bindings out of Swagger files, and I'm noticing a number of issues/anomalies. As Swagger files are supposed to be machine-parsed, they should match a given format without anomalies.
> The following fields are/have typos:
> Unrecognized field "defalutValue" (class ch.loway.oss.ari4java.codegen2.models.ApiParameter)
>  at [Source: ./codegen-data/ari_1_8_0/channels.json; line: 310, column: 25]
> Unrecognized field "descriptioni" (class ch.loway.oss.ari4java.codegen2.models.ApiParameter)
>  at [Source: ./codegen-data/ari_1_8_0/endpoints.json; line: 58, column: 25] 
>  Unrecognized field "descriptioni" (class ch.loway.oss.ari4java.codegen2.models.ApiParameter)
>  at [Source: ./codegen-data/ari_1_8_0/endpoints.json; line: 180, column: 25] 
>  Unrecognized field "__note" 
>  at [Source: ./codegen-data/ari_1_8_0/sounds.json
> (Either we add a "note" field for good, or we'd better drop it).
> I am also trying to generate enums to assist in code refactoring and making code clean where a parameter has a given set of values.
> In general, restricted values are a mix of upper, lower and CamelCase, but some anomalies stand out (I print them here as :
> EDeviceState=[BUSY, INUSE, INVALID, NOT_INUSE, ONHOLD, RINGING, RINGINUSE, UNAVAILABLE], 
> EDeviceStateState=[BUSY, INUSE, INVALID, NOT_INUSE, ONHOLD, RINGING, RINGINUSE, UNAVAILABLE, UNKNOWN], 
> - DeviceStates appear twice, with a different set of entries!
> EChannelState=[Busy, Dialing, Dialing Offhook, Down, OffHook, Pre-ring, Ring, Ringing, Rsrved, Unknown, Up]}
> - "Rserverd"?



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list