This module contains utilities to automatically generate documentation parts from the Fluss source code. This ensures that the documentation stays in sync with the actual implementation and default values.
The ConfigOptionsDocGenerator scans the ConfigOptions class and generates an MDX partial file containing categorized tables of all available configuration settings.
- It uses reflection to find all
ConfigOptionfields in theConfigOptionsclass. - It groups options into sections based on the
@ConfigSectionannotation or key prefixes. - It handles special default value formatting via
@ConfigOverrideDefault. - It outputs an MDX partial file (
_partial_config.mdx) to thewebsite/docs/_configs/directory for direct import into the Docusaurus site.
To update the configuration documentation, run the following command from the project root:
./mvnw compile -pl fluss-docgen -amThe generated file is stored in website/docs/_configs/_partial_config.mdx. To display these tables in the documentation, use the MDX import syntax in any .md or .mdx file:
import PartialConfig from '../_configs/_partial_config.mdx'; <PartialConfig></PartialConfig>