Mar 18, 2016

Generating REST-API Documentation during compile with JAXRS-ANALYZER

Today I found in the OTN Java Newsletter from Oracle a hint to JAXRS-ANALYZER  from
Sebastian Daschner.

This is such an easy tool to use. Just add the build plugin into your pom and compile.

                <!-- Available backends are plaintext (default), swagger and asciidoc -->
                <!-- Domain of the deployed project, defaults to -->

The target document can be adjusted as plaintext swagger and asciidoc.

Te resulting document can be found in the target/jaxrs-analyzer folder of your maven-project.

Here is a screenshot from an asciidoc seen in AsciidocFX of a simple demo JAX-RS resource,
which I implemented to learn a little bit of wildfly-swarm.

Looks like a good starting point, since there is no Annotation or XML-Configuration or anything
else necessary in the source code, because JAXRS-Analyzer does reflection and bytecode analysis.