[docs]Refine ConfigOptionsDocGenerator and fix MDX formatting #2588
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.
Purpose
Linked issue: close #2586
The purpose of this change is to enhance the ConfigOptionsDocGenerator to produce cleaner, more professional MDX documentation. It fixes several formatting artifacts in the auto-generated configuration files, such as Table to list, incorrect type rendering and unformatted description placeholders, and improves the overall code quality of the generator itself.
Brief change log
Changed table to list format for better readability
Enhanced Type Formatting: Refined the getType() logic to strip trailing generic brackets (e.g., converting String> to String) and normalized common Java types for documentation.
Improved Descriptions: Updated cleanDescription() to replace %s placeholders with true to ensure generated sentences are grammatically complete and readable.
Refined Scoping: Improved the logic for the "Scope" field to correctly categorize configurations as Client, Table, or Server based on their key prefixes.
Code Quality & Checkstyle: * Fixed "ignored return value" warnings for File.mkdirs().
Optimized imports and resolved reflective access warnings for the Internal annotation.
Decoupled the generator from ConfigDocUtils to ensure it can run as a standalone utility without classpath resolution issues.
Tests
Manually verified by running the ConfigOptionsDocGenerator main method and inspecting the resulting _partial_config.mdx file.
Verified that the generated MDX renders correctly in a Markdown previewer with working anchors and valid formatting.
Ran ./mvnw compile -pl fluss-docgen -am it passed perfectly
API and Format
This change does not affect the Fluss runtime API or storage format. It only affects the internal documentation generation tool and the resulting .mdx files.
Documentation
This PR improves the quality of the existing configuration documentation. No new user-facing features were added.