swagger-core icon indicating copy to clipboard operation
swagger-core copied to clipboard

Is Jersey Necessary for having Swagger-ui?

Open vijaya89 opened this issue 13 years ago • 3 comments

I already have my rest apis written in java. I havent used jeresey for developing my rest api's So Can I just use swagger-ui for my already developed rest-apis (that are in java)?

vijaya89 avatar Jun 14 '13 17:06 vijaya89

No jersey required--you can follow this example:

https://github.com/wordnik/swagger-core/tree/develop-1.3/samples/scala-servlet

Which shows how you can annotate your servlets (or any class, for that matter) to generate swagger json. Note! The servlet-scanner is not 100% complete, but quite close. I'm waiting for some feedback on it, maybe you can be the first :)

fehguy avatar Jun 14 '13 17:06 fehguy

Thanks for the reply. I will try it. My question is : without using swagger-core, can I just use swagger-ui for my already defined rest api's. My rest api's are in java and I need to return xml instead of json

is there any help document for me to do the above?

vijaya89 avatar Jun 14 '13 17:06 vijaya89

yes you can do this, please either read the wiki:

https://github.com/wordnik/swagger-core/wiki

or follow this sample

https://github.com/wordnik/swagger-core/tree/master/samples/no-server

fehguy avatar Jun 14 '13 19:06 fehguy