arazzo-workflow-output-validation
Every workflow output must have unique name and its value must be a valid runtime expression.
- Applies to
outputs- Selects
$- Function
arazzoWorkflowOutputNamesValidation- Specs
- Arazzo 1.0
- Message
{{error}}
Use it
This rule ships with OpenLint in spectral:arazzo. Extending the ruleset turns it on:
extends: spectral:arazzo
rules:
arazzo-workflow-output-validation: error # or off, or another severity
Definition
As defined in @openlint/openlint-rulesets. Functions show by name.
arazzo-workflow-output-validation:
description: >-
Every workflow output must have unique name and its value must be a valid
runtime expression.
message: '{{error}}'
severity: 0
given: $
then:
function: arazzoWorkflowOutputNamesValidation
About this rule
Every workflow output must have unique name and its value must be a valid runtime expression.
Additionally, if output values use expressions like $workflows.foo.steps.bar, the rule will verify the existence of workflow foo and step bar.
Good Example
// Assuming that `TokenStep` is a defined step and that it exposes an output of `tokenResponse`
outputs:
access_token: $steps.TokenStep.outputs.tokenResponse
Bad Example
outputs:
access_token: $foo