[docs][build] Complete automatic configuration documentation generation
Search before asking
- [x] I searched in the issues and found nothing similar.
Description
Description Task: Improve the ConfigOptionsDocGenerator to ensure the auto-generated configuration documentation is professional, accurate, and free of formatting artifacts.
Purpose: The current documentation generator had several minor issues that impacted the readability of the official docs.
Willingness to contribute
- [x] I'm willing to submit a PR!
The previous implementation in #2588 is now outdated: the current branch has changed, ConfigOptions.java has been updated, configuration.md still contains the manual reference, and the generated _partial_config.mdx file is now ignored.
I'm thinking to start a fresh work from the current main branch instead of resolving the old branch conflicts directly.
Since #4578 proposes refactoring ConfigOptions to address the Checkstyle file-length limit, I think the implementation plan should be updated before continuing, and this plan follows @wuchong guidance in #2474 #issuecomment. The current generator relies on ConfigOptions.class.getDeclaredFields(), so splitting the options into multiple classes could cause some options to be missed.
Proposed plan
- Coordinate with #4578 and define the new configuration-option structure while preserving existing keys, defaults, deprecated aliases, public constant references, and metadata.
- Update
fluss-docgento discover options from all relevant option-holder classes through a stable and deterministic mechanism, rather than scanning onlyConfigOptions.class. - Generate list-style MDX documentation with sections, documentation-only default overrides, type/default formatting, deprecated-option markers, and safe MDX escaping.
- Replace the manually maintained configuration reference with an import of the generated partial, while keeping
_partial_config.mdxignored. - Add an explicit generation step before the Docusaurus build so CI and clean checkouts create the ignored file automatically.
- Add tests verifying that all options are discovered exactly once and that the generated documentation remains complete after the
ConfigOptionsrefactor. - Remove the temporary Checkstyle suppression from #4579 after the refactor is complete.
I wait for the direction of #4578 before starting a fresh PR from the current main, so the generator is not implemented against a structure that may soon change. I also plan to divide the work into smaller PRs to make the changes easier to review. I’d appreciate the feedback on this approach.
cc @wuchong @swuferhong @polyzos