Tweak adoc templates

- Updates path for generated docs
- Adds adoc codegen for expression and fixes expr_types.gen.adoc.tpl
This commit is contained in:
Vivek Patel
2021-10-01 10:08:58 +02:00
committed by Denis Arh
parent da02e9d9b1
commit 0bfa57acd2
7 changed files with 137 additions and 4 deletions
+63
View File
@@ -0,0 +1,63 @@
// This file is auto-generated.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// Definitions file that controls how this file is generated:
{{- range .Definitions }}
// - {{ .Source }}
{{- end }}
{{ range $d := .Definitions }}
= `{{ $d.Name }}`
[cols="2m,4a,3a"]
|===
| Name | Description | I/O
{{- range $f := .Functions }}
{{- if eq $f.Kind "function" }}
| [#fnc-{{ toLower $d.Name }}-{{ toLower $f.Name }}]#<<fnc-{{ toLower $d.Name }}-{{ toLower $f.Name }},{{ if $f.Meta.Short }}{{ $f.Meta.Short }}{{ else }}{{ $f.Name }}{{ end }}>>#
| {{ if $f.Meta.Description }}{{ $f.Meta.Description }}{{ end }}
|
{{- if gt (len $f.Params) 0}}
.Parameters:
{{- range $p := $f.Params}}
* {{ if $p.Required }}#*# {{ end }}`{{ if $p.Meta }}
{{- if $p.Meta.Label }}
{{- $p.Meta.Label }}
{{- else }}
{{- $p.Name }}
{{- end }}
{{- else }}
{{- $p.Name }}
{{- end }}`
({{- range $pti, $pt := $p.Types }}
`{{- $pt.WorkflowType }}`,
{{- end }})
{{- end }}
{{- end }}
{{- if gt (len $f.Results) 0}}
.Results:
{{- range $r := $f.Results}}
* {{ if $r.Meta }}
{{- if $r.Meta.Label }}
{{- $r.Meta.Label }}
{{- else }}
{{- $r.Name }}
{{- end }}
{{- else }}
{{- $r.Name }}
{{- end }} (`{{ $r.WorkflowType }}`)
{{- end }}
{{- end }}
{{- end }}
{{- end }}
|===
{{- end }}
@@ -0,0 +1,32 @@
// This file is auto-generated.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// Definitions file that controls how this file is generated:
{{- range .Definitions }}
// - {{ .Source }}
{{- end }}
[cols="2m,3a"]
|===
| Type | Structure
{{- range .Definitions }}
{{- range $tName, $tDef := .Types }}
{{- if gt (len $tDef.Struct) 0}}
| [#objref-{{ toLower $tName }}]#<<objref-{{ toLower $tName }},{{ $tName }}>>#
|
{{- if $tDef.Struct }}
[source]
----
{
{{- range $s := .Struct }}
{{ $s.Name }} ({{ $s.ExprType }})
{{- end }}
}
----
{{ end }}
{{- end }}
{{- end }}
{{ end }}
|===
+5 -1
View File
@@ -7,6 +7,7 @@
{{- range .Definitions }}
// - {{ .Source }}
{{- end }}
include::ROOT:partial$variables.adoc[]
{{ range .Definitions }}
= {{ .Docs.Title }}
@@ -24,7 +25,10 @@
{{ if .Default -}}
=== Default
`{{ .Default }}`
[source]
----
{{ .Default }}
----
{{ end -}}
{{ if .Description -}}