-
Notifications
You must be signed in to change notification settings - Fork 451
Swagger Maven Plugin
This plugin helps you generate API documents in build phase according to customized output templates.
First of all, Swagger is awesome!
However, a limitation in using Swagger is that you cannot get your API document unless you:
- Write documents with Swagger style
- Configure servlet
- Build your project
- Deploy your project on server
- Start the server
- Call to the servlet to let Swagger listing your APIs.
Another thing is you can get beautiful document by Swagger-ui, but you cannot get the format you need easily. e.g. A simple single markdown document.
This plugin will resolve these problems. It supports customized output template (mustache) and will let you generate the document in build phase, in another word, you'll get the API document by following steps:
- Write documents with Swagger style
- Configure this plugin
- Build (mvn compile)
You'll always get your up to date document after you launch mvn compile. You can easily put the generated document anywhere. (e.g. put in service war package using maven-assembly-plugin)
Check out this sample page which is a markdown file generated by this plugin (with a emmbed mustache template).