-
Notifications
You must be signed in to change notification settings - Fork 308
Fix config documentation generation script #6790
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
Conversation
The JBang script for generating configuration documentation had two issues: 1. Compilation error due to syntax issues (orphaned periods on lines 199-201) 2. Missing observability properties in generated documentation This commit refactors the config generator into a proper Maven module: - Created docs/config-generator as a new JAR module - Moved and refactored generateAllConfigPartial.java to proper package structure - Added comprehensive Javadoc explaining the tool's purpose - Uses exec-maven-plugin with exec:java goal (no shade plugin needed) - Runs in process-classes phase after compilation The generated documentation now includes all configuration properties, including the five new apicurio.metrics.rest.* properties from PR #6713. Also added dependency-reduced-pom.xml to .gitignore for future shade plugin use. Fixes #6734
jsenko
left a comment
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.
LGTM, not executing it through jbang will make this a bit more maintainable.
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.
Pull Request Overview
This PR refactors the documentation generation process by replacing the JBang-based script with a proper Maven module. The config generator is now a standalone module that uses the exec-maven-plugin to generate configuration documentation.
- Moved config generation from JBang script to a proper Maven module
- Cleaned up code formatting and added comprehensive JavaDoc documentation
- Updated generated documentation with new configuration properties
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docs/pom.xml | Removed JBang plugin profile and added config-generator as a module |
| docs/config-generator/pom.xml | New Maven module for config generation with exec-maven-plugin |
| docs/config-generator/src/main/java/io/apicurio/registry/docs/GenerateAllConfigPartial.java | Converted from JBang script to proper Java class with package declaration and JavaDoc |
| docs/modules/ROOT/partials/getting-started/ref-registry-all-configs.adoc | Updated generated documentation with new properties and default values |
| .gitignore | Added dependency-reduced-pom.xml to ignore list |
Comments suppressed due to low confidence (6)
docs/config-generator/src/main/java/io/apicurio/registry/docs/GenerateAllConfigPartial.java:54
- Missing generic type parameters for HashMap. Should be
new HashMap<>()ornew HashMap<String, Option>()to maintain type safety and follow Java best practices.
docs/config-generator/src/main/java/io/apicurio/registry/docs/GenerateAllConfigPartial.java:1 - The generated documentation contains excessive whitespace between sentences (multiple spaces instead of single space). This appears to be a formatting issue in the source data or the generation logic. The description text should have consistent single-space separation between sentences.
docs/config-generator/src/main/java/io/apicurio/registry/docs/GenerateAllConfigPartial.java:1 - The generated documentation contains excessive whitespace between sentences (multiple spaces instead of single space). This appears to be a formatting issue in the source data or the generation logic. The description text should have consistent single-space separation between sentences.
docs/config-generator/src/main/java/io/apicurio/registry/docs/GenerateAllConfigPartial.java:1 - The generated documentation contains excessive whitespace between sentences (multiple spaces instead of single space). This appears to be a formatting issue in the source data or the generation logic. The description text should have consistent single-space separation between sentences.
docs/config-generator/src/main/java/io/apicurio/registry/docs/GenerateAllConfigPartial.java:1 - The generated documentation contains excessive whitespace between sentences (multiple spaces instead of single space). This appears to be a formatting issue in the source data or the generation logic. The description text should have consistent single-space separation between sentences.
docs/config-generator/src/main/java/io/apicurio/registry/docs/GenerateAllConfigPartial.java:1 - The generated documentation contains excessive whitespace between sentences (multiple spaces instead of single space). This appears to be a formatting issue in the source data or the generation logic. The description text should have consistent single-space separation between sentences.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| |`quarkus.oidc.token-path` | ||
| |`string` | ||
| | | ||
| |`/protocol/openid-connect/token/` |
Copilot
AI
Oct 29, 2025
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.
The default value for quarkus.oidc.token-path ends with a trailing slash (/protocol/openid-connect/token/), which is likely incorrect. OAuth/OIDC token endpoints typically don't have trailing slashes. This should be /protocol/openid-connect/token without the trailing slash.
| |`/protocol/openid-connect/token/` | |
| |`/protocol/openid-connect/token` |
Summary
Fixes #6734 by refactoring the configuration documentation generator from a JBang script into a proper Maven module. With this change, if the java code fails to compile then the build will fail during the compile phase. Previously if there was a problem, the jbang exec could fail with logging info but without failing the build.
Issues Fixed
Changes
Created
docs/config-generatorMaven Moduledocs/config-generatorio.apicurio.registry.docsapicurio-registry-config-definitionsandjandexRefactored Build Process
exec-maven-pluginwithexec:javagoal (no shade plugin needed)process-classesphase after compilationGenerated Documentation
The generated documentation now correctly includes all configuration properties, including:
apicurio.metrics.rest.enabledapicurio.metrics.rest.path-filter-patternapicurio.metrics.rest.method-tag-enabledapicurio.metrics.rest.path-tag-enabledapicurio.metrics.rest.explicit-status-codes-listAdditional Changes
dependency-reduced-pom.xmlto.gitignorefor future useTesting
Verified that:
Migration Notes
The config generator is now built and executed as part of the
docs/config-generatormodule. To generate documentation:To skip documentation generation: