plugin-barman-cloud/docs/markdown/type.tpl
Niccolò Fei 74bdb9a590
feat: generate apidoc using genref (#228)
Closes #206

Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
Co-authored-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
2025-03-27 22:42:46 +01:00

38 lines
957 B
Smarty

{{ define "type" }}
## {{ .Name.Name }} {#{{ .Anchor }}}
{{ if eq .Kind "Alias" -}}
(Alias of `{{ .Underlying }}`)
{{ end }}
{{- with .References }}
**Appears in:**
{{ range . }}
{{ if or .Referenced .IsExported -}}
- [{{ .DisplayName }}]({{ .Link }})
{{ end -}}
{{- end -}}
{{- end }}
{{ if .GetComment -}}
{{ .GetComment }}
{{ end }}
{{ if .GetMembers -}}
<table class="table">
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
<tbody>
{{- /* . is a apiType */ -}}
{{- if .IsExported -}}
{{- /* Add apiVersion and kind rows if deemed necessary */}}
<tr><td><code>apiVersion</code> <B>[Required]</B><br/>string</td><td><code>{{- .APIGroup -}}</code></td></tr>
<tr><td><code>kind</code> <B>[Required]</B><br/>string</td><td><code>{{- .Name.Name -}}</code></td></tr>
{{- end -}}
{{/* The actual list of members is in the following template */}}
{{- template "members" . -}}
</tbody>
</table>
{{- end -}}
{{- end -}}