Compare commits

...

2 Commits

Author SHA1 Message Date
renovate[bot]
6af7994476
Merge f4b38b9891 into 08ab561429 2026-02-09 21:44:00 +01:00
Marco Nenciarini
08ab561429
docs(apidoc): filter Optional markers from validation column (#723)
Some checks failed
release-please / release-please (push) Failing after 4s
The crd-ref-docs tool v0.3.0 started rendering `+optional` Go markers as
`Optional: {}` in API documentation's validation column. This appeared
as redundant empty JSON objects since the Required column already
conveyed this information. The PR updates the documentation template to
filter these markers while keeping meaningful validation rules like
patterns and enums, and removes unnecessary customMarkers configuration.

Closes #722

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
2026-02-04 13:46:51 +01:00
2 changed files with 1 additions and 4 deletions

View File

@ -1,9 +1,6 @@
processor:
ignoreGroupVersions:
- "GVK"
customMarkers:
- name: "optional"
target: field
ignoreFields:
# - "status$"
- "TypeMeta$"

View File

@ -31,7 +31,7 @@ _Appears in:_
{{ end -}}
{{ range $type.Members -}}
| `{{ .Name }}` _{{ markdownRenderType .Type }}_ | {{ template "type_members" . }} | {{ if not .Markers.optional -}}True{{- end }} | {{ markdownRenderDefault .Default }} | {{ range .Validation -}} {{ markdownRenderFieldDoc . }} <br />{{ end }} |
| `{{ .Name }}` _{{ markdownRenderType .Type }}_ | {{ template "type_members" . }} | {{ if not .Markers.optional -}}True{{- end }} | {{ markdownRenderDefault .Default }} | {{ range .Validation -}}{{- $v := markdownRenderFieldDoc . }}{{- if and $v (ne $v "Optional: \\{\\}") -}} {{ $v }} <br />{{ end }}{{- end }} |
{{ end -}}
{{ end -}}