camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Wheadon (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-9220) Model schema not including nested objects
Date Tue, 13 Oct 2015 21:53:05 GMT
Jason Wheadon created CAMEL-9220:
------------------------------------

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

@ApiModel
public class SomeRequest {
    @ApiModelProperty
    private List<SomeObject> someObjects;
    ...
}

@ApiModel
public class SomeObject {
    @ApiModelProperty
    private String somePropertyOne;
    @ApiModelProperty
    private String somePropertyTwo;
    ...
}

Should have a model in swagger of:
{ 
  "someObjects": [ 
    { 
      "someObjectPropertyOne": "", 
      "someObjectPropertyTwo": "" 
    } 
  ] 
} 

But instead has:
{ 
  "someObjects": [ 
    "SomeObject" 
  ] 
} 

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