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

Ben Merrills (JIRA) noreply at issues.asterisk.org
Mon Sep 21 03:03:33 CDT 2015


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

Ben Merrills commented on ASTERISK-25406:
-----------------------------------------

Side note, it would be nice if we could standardise on 1.2 for the whole of the spec and not just Events.json.

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