arazzo-step-parameters-validation
Step parameters and workflow parameters must valid.
- Applies to
parameters- Selects
$- Function
arazzoStepParametersValidation- 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-step-parameters-validation: error # or off, or another severity
Definition
As defined in @openlint/openlint-rulesets. Functions show by name.
arazzo-step-parameters-validation:
description: Step parameters and workflow parameters must valid.
message: '{{error}}'
severity: 0
given: $
then:
function: arazzoStepParametersValidation
About this rule
Parameters must be unique based on their combination of name and in properties when defined at the workflow level or within a step. Step parameters can override workflow level parameters.
Additionally rule checks:
- reusable parameter references must be a valid Arazzo runtime expression (e.g.
$components.parameters.<name>) and the referenced parameter must be existing within the components parameters - parameter values using expressions, must be a valid Arazzo Specification Runtime Expressions](https://spec.openapis.org/arazzo/v1.0.0.html#runtime-expressions). Additionally, if parameter values use expressions like
$workflows.foo.steps.bar, the rule will verify the existence of workflowfooand stepbar.
Good Example
parameters:
- name: username
in: query
value: $inputs.username
Bad Example
parameters:
- name: username
in: query
value: $foo