Hi,
Attached is the swagger json generated using swagger v2/apidocs.

I have three java pojos in which I am using the common object 
SwaggerSubModel.
If I use the SwaggerSubModel object in only one java pojo it works fine but 
with using it in different places Swagger is not generating the correct xml 
Example.

*Example shown in Swagger Editor:*

<?xml version="1.0" encoding="UTF-8"?>
<SwaggerXmlJson>
<Country>string</Country>
<DocumentName>string</DocumentName>
<Language>string</Language>
<subModel>
<Test001>string</Test001>
<Test002>2018-05-02T18:03:16.535Z</Test002>
</subModel>
<Url>string</Url>
</SwaggerXmlJson>

I am expecting the highlighted element with SwaggerSubModelXmlJson as 
mentioned in below pojo:

@Getter
@Setter
@Accessors(chain = true)
@XmlAccessorType(XmlAccessType.FIELD)
public class SwaggerXmlJson {

    @XmlElement(name = "Url", required = true)
    @NotNull
    protected String url;
    @XmlElement(name = "Country", required = true)
    @NotNull
    protected String country;
    @XmlElement(name = "Language", required = true)
    @NotNull
    protected String language;
    @XmlElement(name = "DocumentName", required = true)
    @NotNull
    protected String documentName;

    @XmlElement(name = "SwaggerSubModelXmlJson")
    protected SwaggerSubModel subModel;
}



Please let me know if I am missing something here


Thanks

Mahitha

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: swagger.json
Description: application/json

Reply via email to