I'm using Swagger to generate documentation for my jax-rs based API. In one of my models I have the following property:
@XmlElementWrapper(name = "clip_list")
@XmlElement(name = "clip")
public List<Clip> mClips = new ArrayList<Clip>();
However the JSON model generated in the UI is as follows:
"clip": [
{
"duration":"",
"url":"",
"thumb":"",
}
]
So obviously the XmlElementWrapper annotation is not parsed. How can I force Swagger to correctly nest elements?
The output should be like :
"clip_list": [
{
"duration":"",
"url":"",
"thumb":"",
}
]