diff --git a/docs/features/software-templates/input-examples.md b/docs/features/software-templates/input-examples.md index ad56ef2d36..a95cee24f4 100644 --- a/docs/features/software-templates/input-examples.md +++ b/docs/features/software-templates/input-examples.md @@ -194,3 +194,47 @@ parameters: input: message: 'production step' ``` + +## Use parameters as conditional for fields + +```yaml +parameters: + - title: Fill in some steps + properties: + includeName: + title: Include Name? + type: boolean + default: true + + dependencies: + includeName: + allOf: + - if: + properties: + includeName: + const: true + then: + properties: + lastName: + title: Last Name + type: string +``` + +## Conditionally set parameters + +```yaml +spec: + parameters: + - title: Fill in some steps + properties: + path: + title: path + type: string + + steps: + - id: fetch + name: Fetch template + action: fetch:template + input: + url: ${{ parameters.path if parameters.path else '/root' }} +```