Red Ant
Red Ant

Reputation: 375

swagger : annotation in java code to json spec conversion

I am looking for a tool that reads the java file with swagger annotation and generates that API JSON spec file? Please do let me know if there is already one.

Upvotes: 0

Views: 1020

Answers (1)

Navid Shakibapour
Navid Shakibapour

Reputation: 555

You can use swaggerdocgen Maven plugin to generate Swagger documents in the both JSON and YAML formats. This is assuming that you are able to use Maven for your application.

You can find more information about swaggerdocgen plugin here: https://github.com/WASdev/tool.swagger.docgen

Basically, you need to create a WAR Maven project and add your application files there. Then as part of running mvn package, the Swagger document will be generated in the 'Target' directory of your project.

Upvotes: 2

Related Questions