Skip to content

Conversation

@mnencia
Copy link
Member

@mnencia mnencia commented Jan 9, 2026

The crd-ref-docs tool automatically recognizes the +optional marker comments in Go code and renders them as validation entries. A recent upstream change in github.com/elastic/crd-ref-docs master branch started rendering these as Optional: {} text in the validation column, which looks like an empty JSON object and is redundant since the Required column already shows this information.

This PR updates the documentation template to filter out these Optional markers while preserving meaningful validation rules like patterns and enums. Also removes the now-redundant customMarkers configuration, as the current version of crd-ref-docs recognizes the optional marker without explicit configuration.

Closes #722

@mnencia mnencia requested a review from a team as a code owner January 9, 2026 16:14
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. documentation Improvements or additions to documentation labels Jan 9, 2026
The crd-ref-docs tool automatically recognizes the +optional marker
comments in Go code and renders them as validation entries. A recent
upstream change in github.com/elastic/crd-ref-docs master branch
started rendering these as `Optional: {}` text in the validation
column, which looks like an empty JSON object and is redundant since
the Required column already shows this information.

Update the documentation template to filter out these Optional markers
while preserving meaningful validation rules like patterns and enums.
Also remove the now-redundant customMarkers configuration, as the
current version of crd-ref-docs recognizes the optional marker without
explicit configuration.

Closes #722

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
@mnencia mnencia marked this pull request as draft January 9, 2026 18:03
@mnencia
Copy link
Member Author

mnencia commented Jan 9, 2026

Closing in favor of PR #724 which addresses the root cause by pinning crd-ref-docs to v0.2.0 instead of working around the issue with template filters.

@mnencia mnencia closed this Jan 9, 2026
@mnencia mnencia deleted the dev/722 branch January 13, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: confusing 'Optional: {}' markers appear in API documentation validation column

1 participant