Swagger Model generation

56 views
Skip to first unread message

Mayur Jain

unread,
Mar 24, 2015, 2:26:25 AM3/24/15
to swagger-sw...@googlegroups.com
Hi ,

I am using Jersey as my rest container , and have integrated swagger with Jersey to generate swagger model for rest-resources.
One of my rest-resource has methods

     public JAXBElement<Double> getAge() {
        return age;
    }

 public JAXBElement<QueryBean> getData() {
        return data;
    }

 public JAXBElement<String> getName() {
        return name;
    }

this class was generated using Jaxb-xjc , swagger core is not generating models for JAXBElement , which is very common type in Service implementation.
This is how the model looks.

  • name
    {
    • $ref"javax.xml.bind.JAXBElement<java.lang.String>"
    },
  • data
    {
    • $ref"javax.xml.bind.JAXBElement<coldfusion.xml.rpc.xsd.QueryBean>"
    },
  • age
    {
    • $ref"javax.xml.bind.JAXBElement<java.lang.Double>"
    }

Ron Ratovsky

unread,
Mar 26, 2015, 12:51:21 PM3/26/15
to swagger-sw...@googlegroups.com
I'd suggest you open an issue on swagger-core asking for better introspection support for this use case.

--
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 swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------
Reply all
Reply to author
Forward
0 new messages