Gradle plugin for the JAX-RS Analyzer.
Using the plugin:
plugins { id("io.github.grimmjo.jaxrs-analyzer") version "0.4" }
After building your project, the documentation resides under 'build/jaxrs-analyzer/'.
Important
|
The plugin id changed from com.github.grimmjo to io.github.grimmjo.jaxrs-analyzer
|
-
update to gradle 8
-
migrates the plugin to kotlin
-
support all main source sets
A full working example can be found here
jaxRsAnalyzer { // Available backends are plaintext, asciidoc and swagger (default) backend 'swagger', 'asciidoc' // Domain of the deployed project, defaults to "" domain 'localhost:8080' // Comma separated list of Swagger schemes (only for if backend is swagger, defaults to http) schemes 'http', 'https' // Enables rendering of Swagger tags (defaults to false -> default tag will be used) renderTags true // The number at which path position the Swagger tags will be extracted (defaults to 0) tagPathOffset 0 // Directory (relative to buildDir) where resources will be generated (defaults to jaxrs-analyzer) outputDirectory 'jaxrs-analyzer' }
The backend
parameter specifies the output format of the analysis.
The available formats are plaintext, asciidoc and swagger.
Multiple values are allowed. E.g.
jaxRsAnalyzer {
// Available backends are plaintext (default), swagger and asciidoc
backend 'swagger', 'asciidoc'
…
}
This would generate the documentation for swagger and asciidoc.
For further use of the created formats see the JAX-RS Analyzer documentation.
With domain
the user may specify the URL which will contain the REST API later on.
Tools like Swagger make use of this information (and offer possibilities to send calls directly, etc.).