Doc codegen tweaks & cleanup
This commit is contained in:
@@ -8,37 +8,44 @@
|
||||
// - {{ .Source }}
|
||||
{{- end }}
|
||||
|
||||
= Resources and events
|
||||
{{- range .Definitions }}
|
||||
{{- range .Resources }}
|
||||
|
||||
= {{ .ResourceString }}
|
||||
== {{ .ResourceString }}
|
||||
|
||||
== Events
|
||||
=== Events
|
||||
|
||||
.Events:
|
||||
{{- if .BeforeAfter }}
|
||||
.Before/after events:
|
||||
{{- range $ba := .BeforeAfter }}
|
||||
* `before('{{ $ba }}')`
|
||||
{{- end }}
|
||||
{{- range $ba := .BeforeAfter }}
|
||||
* `after('{{ $ba }}')`
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ if .On -}}
|
||||
.On events:
|
||||
{{- range $on := .On }}
|
||||
* `on('{{ $on }}')`
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
== Argument properties
|
||||
=== Exec arguments
|
||||
|
||||
.Argument properties:
|
||||
[%header, cols=3*]
|
||||
|===
|
||||
|Name|Type|Immutable
|
||||
|Name|Type|Mutable
|
||||
{{- range $p := .Properties }}
|
||||
| `{{ $p.Name }}`
|
||||
| `{{ $p.Type }}`
|
||||
{{- if $p.Immutable }}
|
||||
| yes
|
||||
{{ else }}
|
||||
| no
|
||||
{{ else }}
|
||||
| yes
|
||||
{{ end -}}
|
||||
|
||||
{{ end -}}
|
||||
|
||||
@@ -8,26 +8,22 @@
|
||||
// - {{ .Source }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
= ENV options
|
||||
{{ range .Definitions }}
|
||||
|
||||
= {{ .Docs.Title }}
|
||||
|
||||
== {{ .Docs.Title }}
|
||||
{{ if .Docs.Intro }}
|
||||
{{ .Docs.Intro }}
|
||||
{{ end }}
|
||||
{{- range .Properties }}
|
||||
=== *{{ toUpper .Env }}* `{{ .Type }}`
|
||||
|
||||
{{ range .Properties }}
|
||||
|
||||
== *{{ toUpper .Env }}* `{{ .Type }}`
|
||||
|
||||
{{ if .Default }}
|
||||
{{ if or .Default .Description -}}
|
||||
{{ if .Default -}}
|
||||
Default::
|
||||
`{{ .Default }}`
|
||||
`{{ .Default }}`
|
||||
{{ end -}}
|
||||
{{ if .Description }}
|
||||
{{ if .Description -}}
|
||||
Description::
|
||||
{{ .Description }}
|
||||
{{ end -}}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ .Description }}
|
||||
{{ end -}}{{ end -}}
|
||||
{{ end }}{{ end }}
|
||||
Reference in New Issue
Block a user