Options codegen improvements
- Add extra cli switches to generate docs from options - More automation/fallbacks/default values for options
This commit is contained in:
@@ -4,20 +4,30 @@
|
||||
// the code is regenerated.
|
||||
//
|
||||
// Definitions file that controls how this file is generated:
|
||||
// {{ .Source }}
|
||||
|
||||
= {{ export $.Name }}
|
||||
|
||||
[cols="2,3,5a"]
|
||||
|===
|
||||
|Type|Default value|Description
|
||||
|
||||
{{- range $prop := $.Properties }}
|
||||
3+| *{{ toUpper $prop.Env }}*
|
||||
|`{{ $prop.Type }}`
|
||||
|{{- if $prop.Default }}
|
||||
{{- $prop.Default -}}
|
||||
{{- end -}}
|
||||
|{{ $prop.Description }}
|
||||
{{- range .Definitions }}
|
||||
// - {{ .Source }}
|
||||
{{- end }}
|
||||
|===
|
||||
|
||||
|
||||
{{ range .Definitions }}
|
||||
|
||||
= {{ .Docs.Title }}
|
||||
|
||||
{{ .Docs.Intro }}
|
||||
|
||||
{{ range .Properties }}
|
||||
|
||||
== *{{ toUpper .Env }}* `{{ .Type }}`
|
||||
|
||||
{{ if .Default }}
|
||||
Default::
|
||||
`{{ .Default }}`
|
||||
{{ end -}}
|
||||
{{ if .Description }}
|
||||
Description::
|
||||
{{ .Description }}
|
||||
{{ end -}}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user