Compare commits

..

3 Commits

Author SHA1 Message Date
renovate[bot]
ac88761c73 chore(deps): lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-06 11:31:35 +11:00
Gabriele Bartolini
f12c978732 docs: add CONTRIBUTING.md file
Some checks failed
release-please / release-please (push) Failing after 4s
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
2026-03-02 17:03:09 +11: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
4 changed files with 12 additions and 5 deletions

10
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,10 @@
# Contributing to CloudNativePG
Thank you for your interest in contributing! 💖
To ensure consistency across the project, all CloudNativePG repositories follow
a common set of guidelines regarding code of conduct, AI usage, and
contribution workflows.
Please review the [CloudNativePG Project contributing guidelines](https://github.com/cloudnative-pg/governance/blob/main/CONTRIBUTING.md)
before searching for issues, reporting bugs, or submitting a pull request.

View File

@ -86,7 +86,7 @@ tasks:
# renovate: datasource=git-refs depName=crd-gen-refs lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main # renovate: datasource=git-refs depName=crd-gen-refs lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_CRDGENREF_SHA: ee59e34a99940e45f87a16177b1d640975b05b74 DAGGER_CRDGENREF_SHA: ee59e34a99940e45f87a16177b1d640975b05b74
# renovate: datasource=go depName=github.com/elastic/crd-ref-docs # renovate: datasource=go depName=github.com/elastic/crd-ref-docs
CRDREFDOCS_VERSION: v0.2.0 CRDREFDOCS_VERSION: v0.3.0
cmds: cmds:
- > - >
GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/crd-ref-docs@${DAGGER_CRDGENREF_SHA} GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/crd-ref-docs@${DAGGER_CRDGENREF_SHA}

View File

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

View File

@ -31,7 +31,7 @@ _Appears in:_
{{ end -}} {{ end -}}
{{ range $type.Members -}} {{ 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 -}}
{{ end -}} {{ end -}}