camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-9220) swagger - Model schema not including nested objects
Date Thu, 15 Oct 2015 05:21:05 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-9220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen updated CAMEL-9220:
-------------------------------
    Summary: swagger - Model schema not including nested objects  (was: Model schema not including
nested objects)

> swagger - Model schema not including nested objects
> ---------------------------------------------------
>
>                 Key: CAMEL-9220
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9220
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-swagger
>    Affects Versions: 2.16.0
>            Reporter: Jason Wheadon
>
> This issue relates to the new camel-swagger-java component and not the camel-swagger
component. JIRA is not yet updated for the new camel-swagger-java component.
> When there are nested objects in the Api model for swagger, they are not being represented
correctly in the model schema. See below for an example:
> {code:title=SomeRequest.java|borderStyle=solid}
> @ApiModel
> public class SomeRequest {
>     @ApiModelProperty
>     private List<SomeObject> someObjects;
>     ...
> }
> {code}
> {code:title=SomeObject.java|borderStyle=solid}
> @ApiModel
> public class SomeObject {
>     @ApiModelProperty
>     private String somePropertyOne;
>     @ApiModelProperty
>     private String somePropertyTwo;
>     ...
> }
> {code}
> Should have a model in swagger of:
> {code:none}
> { 
>   "someObjects": [ 
>     { 
>       "somePropertyOne": "", 
>       "somePropertyTwo": "" 
>     } 
>   ] 
> }
> {code}
> But instead has:
> {code:none}
> { 
>   "someObjects": [ 
>     "SomeObject" 
>   ] 
> }
> {code}
> This model is invalid and makes the swagger documentation useless as no one knows what
the request model is supposed to be.
> Note: this worked correctly on camel 2.15.3 with the scala based camel-swagger component.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message