JAX-RS: Get swagger.json For Free! 📎
mvn clean install
your project:
<plugin>
<groupId>com.sebastian-daschner</groupId>
<artifactId>jaxrs-analyzer-maven-plugin</artifactId>
<version>0.3</version>
<executions>
<execution>
<goals>
<goal>analyze-jaxrs</goal>
</goals>
<configuration>
<!-- Available backends, defaults to plaintext -->
<!-- <backend>plaintext</backend> -->
<backend>swagger</backend>
</configuration>
</execution>
</executions>
</plugin>
The recent release (swaggerina) of headlands ships with swagger-ui with the spec generated by the JAX-RS analyzer plugin. A drop-in WAR is also available.
Big thanks to Sebastian Daschner, an airhacks alumni, for this time-saver. I think you should star the repo: https://github.com/sdaschner/jaxrs-analyzer :-).
See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting