plugin-barman-cloud/docs/markdown/pkg.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

44 lines
984 B
Smarty

{{ define "packages" -}}
# API Reference
{{ $grpname := "" -}}
{{- range $idx, $val := .packages -}}
{{- if and (ne .GroupName "") (eq $grpname "") -}}
{{ .GetComment -}}
{{- $grpname = .GroupName -}}
{{- end -}}
{{- end }}
## Resource Types
{{ range .packages -}}
{{- /* if ne .GroupName "" */ -}}
{{- range .VisibleTypes -}}
{{- if .IsExported }}
- [{{ .DisplayName }}]({{ .Link }})
{{- end -}}
{{- end -}}
{{- /* end */ -}}
{{- end -}}
{{- range .packages -}}
{{- if ne .GroupName "" -}}
{{- /* For package with a group name, list all type definitions in it. */ -}}
{{- range .VisibleTypes -}}
{{- if or .Referenced .IsExported -}}
{{ template "type" . }}
{{- end -}}
{{- end }}
{{- else -}}
{{- /* For package w/o group name, list only types referenced. */ -}}
{{- range .VisibleTypes -}}
{{- if .Referenced -}}
{{ template "type" . }}
{{- end -}}
{{- end }}
{{- end }}
{{- end }}
{{- end }}