Generating Swagger UI documentation for REST API

user3767923 picture user3767923 · May 23, 2015 · Viewed 43.5k times · Source

I have my REST API developed using JAX-RS/Jersey in Java. I want to convert to/generate Swagger based UI documentation for it. Can anyone please tell me precise/steps in simple way on how to do so? I m sorry but, steps given on their site are little vague for me.

Answer

Ron picture Ron · May 26, 2015

There are several ways to integrate swagger-core with your application, but based on your description, I'd just follow the wiki page as described either by https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-Jersey-1.X-Project-Setup-1.5 or https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-Jersey-2.X-Project-Setup-1.5 depending on the Jersey version you use.

Those pages also link to a set of samples you can use for reference and see how they work. They also pull in swagger-ui directly into them so you can see a full set of interaction.