Options codegen improvements

- Add extra cli switches to generate docs from options
 - More automation/fallbacks/default values for options
This commit is contained in:
Denis Arh
2020-12-02 16:12:07 +01:00
parent 802f6bc73d
commit 44f7166d97
37 changed files with 265 additions and 687 deletions
+26 -16
View File
@@ -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 }}