-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tool to generate configuration reference docs #606
Conversation
48ec569
to
64eed98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to adding this very useful tool... Just a couple of naming comments :)
gradle/projects.main.properties
Outdated
|
||
polaris-ref-config-annotations=tools/ref-config/annotations | ||
polaris-ref-config-generator=tools/ref-config/generator | ||
polaris-ref-config-site=tools/ref-config/site |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: IMHO the name ref-config
looks a bit awkward... How about tools/config-doc
?
|
||
import java.time.Duration; | ||
|
||
public interface IntOne extends IntTwo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: IntOne
makes me think of integer 1
:) Maybe InterfaceOne
?
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 apache#469. Gradle projects added in this change are: * `polaris-config-doc-annotations` adds an annotation used when generating docs to influence the generation of the configuration reference docs. * `polaris-config-doc-generator` is the reference doc generator implementation, as a "standalone" tool that uses javadoc _infrastructure_. See `ReferenceConfigDocsGenerator` why it needs to be a separate tool than "just" a doclet (class loader isolation issues). * `polaris-site-reference-docs` actually 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.
64eed98
to
1ac6462
Compare
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-annotations
adds an annotation used when generating docs to influence the generation of the configuration reference docs.polaris-config-doc-generator
is the reference doc generator implementation, as a "standalone" tool that uses javadoc infrastructure. SeeReferenceConfigDocsGenerator
why it needs to be a separate tool than "just" a doclet (class loader isolation issues).polaris-site-reference-docs
actually 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.