Skip to content

Commit

Permalink
chore: bump elastic/crd-ref-docs to 0.0.11 to enable validation field…
Browse files Browse the repository at this point in the history
… in docs (#3068)

Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Co-authored-by: odubajDT <ondrej.dubaj@dynatrace.com>
  • Loading branch information
RealAnna and odubajDT committed Mar 14, 2024
1 parent b1eae61 commit ef57804
Show file tree
Hide file tree
Showing 12 changed files with 2,372 additions and 1,771 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/generate-crd-docs/generate-crd-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Inputs: None

# renovate: datasource=github-releases depName=elastic/crd-ref-docs
GENERATOR_VERSION=v0.0.10
GENERATOR_VERSION=v0.0.11
API_DOMAIN="keptn.sh"
OPERATOR_API_ROOT='lifecycle-operator/apis/'
METRICS_API_ROOT='metrics-operator/api/'
Expand Down
19 changes: 13 additions & 6 deletions .github/scripts/generate-crd-docs/templates/type.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@

{{ $type.Doc }}

{{ if $type.Validation -}}
_Validation:_
{{- range $type.Validation }}
- {{ . }}
{{- end }}
{{- end }}

{{ if $type.References -}}
_Appears in:_
{{- range $type.SortedReferences }}
Expand All @@ -16,21 +23,21 @@ _Appears in:_
{{- end }}

{{ if $type.Members -}}
| Field | Description | Default | Optional |
| --- | --- | --- | --- |
| Field | Description | Default | Optional |Validation |
| --- | --- | --- | --- | --- |
{{ if $type.GVK -}}
| `apiVersion` _string_ | `{{ $type.GVK.Group }}/{{ $type.GVK.Version }}` | | |
| `kind` _string_ | `{{ $type.GVK.Kind }}` | | |
| `apiVersion` _string_ | `{{ $type.GVK.Group }}/{{ $type.GVK.Version }}` | | | |
| `kind` _string_ | `{{ $type.GVK.Kind }}` | | | |
{{ end -}}

{{ range $type.Members -}}
| `{{ .Name }}` _{{ markdownRenderType .Type }}_ | {{ template "type_members" . }} |
| `{{ .Name }}` {{ if .Type.IsAlias }}_{{ markdownRenderTypeLink .Type.UnderlyingType }}_{{else}}_{{ markdownRenderType .Type }}_{{ end }} | {{ template "type_members" . }} |
{{- if index .Markers "kubebuilder:default" -}}
{{- with index (index .Markers "kubebuilder:default") 0 -}}
{{ .Value -}}
{{ end -}}
{{ end -}}
| {{ if index .Markers "optional" }}✓{{ else }}x{{ end }} |
| {{ if index .Markers "optional" }}✓{{ else }}x{{ end }} | {{ range .Validation -}} {{ . }} <br />{{ end }} |
{{ end }}

{{- end -}}
Expand Down
Loading

0 comments on commit ef57804

Please sign in to comment.