mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-11 21:23:12 +01:00
Switch to building documentation in markdown, avoiding the markdown+html hybrid we have. Closes #250 Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
50 lines
1.2 KiB
Smarty
50 lines
1.2 KiB
Smarty
{{- define "type" -}}
|
|
{{- $type := . -}}
|
|
{{- if markdownShouldRenderType $type -}}
|
|
|
|
#### {{ $type.Name }}
|
|
|
|
{{ if $type.IsAlias }}_Underlying type:_ _{{ markdownRenderTypeLink $type.UnderlyingType }}_{{ end }}
|
|
|
|
{{ $type.Doc }}
|
|
|
|
{{ if $type.Validation -}}
|
|
_Validation:_
|
|
{{- range $type.Validation }}
|
|
- {{ . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{ if $type.References -}}
|
|
_Appears in:_
|
|
{{- range $type.SortedReferences }}
|
|
- {{ markdownRenderTypeLink . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{ if $type.Members -}}
|
|
| Field | Description | Required | Default | Validation |
|
|
| --- | --- | --- | --- | --- |
|
|
{{ if $type.GVK -}}
|
|
| `apiVersion` _string_ | `{{ $type.GVK.Group }}/{{ $type.GVK.Version }}` | True | | |
|
|
| `kind` _string_ | `{{ $type.GVK.Kind }}` | True | | |
|
|
{{ end -}}
|
|
|
|
{{ range $type.Members -}}
|
|
| `{{ .Name }}` _{{ markdownRenderType .Type }}_ | {{ template "type_members" . }} | {{ if not .Markers.optional -}}True{{- end }} | {{ markdownRenderDefault .Default }} | {{ range .Validation -}} {{ markdownRenderFieldDoc . }} <br />{{ end }} |
|
|
{{ end -}}
|
|
|
|
{{ end -}}
|
|
|
|
{{ if $type.EnumValues -}}
|
|
| Field | Description |
|
|
| --- | --- |
|
|
{{ range $type.EnumValues -}}
|
|
| `{{ .Name }}` | {{ markdownRenderFieldDoc .Doc }} |
|
|
{{ end -}}
|
|
{{ end -}}
|
|
|
|
|
|
{{- end -}}
|
|
{{- end -}}
|