Merge pull request #5890 from premisedata/template_docs

[Docs] Update writing templates to include arrays + json input step
This commit is contained in:
Fredrik Adelöw
2021-06-07 10:19:21 +02:00
committed by GitHub
@@ -142,6 +142,12 @@ this:
"type": "string",
"title": "Last name"
},
"nicknames":{
"type": "array",
"items": {
"type": "string"
}
},
"telephone": {
"type": "string",
"title": "Telephone",
@@ -161,6 +167,11 @@ this:
"ui:emptyValue": "",
"ui:autocomplete": "given-name"
},
"nicknames": {
"ui:options":{
"orderable": false
}
},
"telephone": {
"ui:options": {
"inputType": "tel"
@@ -202,6 +213,12 @@ spec:
title: Last name
ui:emptyValue: ''
ui:autocomplete: given-name
nicknames:
type: array
items:
type: string
ui:options:
orderable: false
telephone:
type: string
title: Telephone
@@ -304,7 +321,10 @@ You might have noticed in the examples that there are `{{ }}`, and these are a
`yaml` together. All the form inputs from the `parameters` section, when passed
to the steps will be available by using the template syntax
`{{ parameters.something }}`. This is great for passing the values from the form
into different steps and reusing these input variables.
into different steps and reusing these input variables. To pass arrays or
objects use the syntax `{{ json paramaters.something }}` where
`paramaters.something` is of type `object` or `array` in the `jsonSchema`, such
as the `nicknames` parameter in the previous example.
As you can see above in the `Outputs` section, `actions` and `steps` can also
output things. So you can grab that output by using