Tool to generate configuration reference docs #606
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Having documentation about the configuration that is both "up-to-date" and "in-sync with the source code" with the actual code is good practice.
The functionality added in this change allows generating markdown docs from smallrye-config based configuration types, starting at and grouped by types that are annotated with
@ConfigMapping. The javadoc of the config interfaces and properties is emitted as markdown. On top there is functionality to generate reference docs for "static" types (currently unused in Polaris).The code is nearly a 1:1 port of the same functionality in Nessie. This change will become useful with/after #469.
Gradle projects added in this change are:
polaris-config-doc-annotationsadds an annotation used when generating docs to influence the generation of the configuration reference docs.polaris-config-doc-generatoris the reference doc generator implementation, as a "standalone" tool that uses javadoc infrastructure. SeeReferenceConfigDocsGeneratorwhy it needs to be a separate tool than "just" a doclet (class loader isolation issues).polaris-site-reference-docsactually generates the markdown files from referenced Gradle projects. Currently there are no projects referenced, so generation yields nothing.The generated docs are not yet integrated into the website, which will happen in a follow-up PR.