You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jason Wheadon (JIRA)" <ji...@apache.org> on 2015/10/13 23:53:05 UTC
[jira] [Created] (CAMEL-9220) Model schema not including nested
objects
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)