Requires a $sourceDescriptions.<name> reference to use the name of a source description defined in sourceDescriptions.
| Arazzo | Compatibility |
|---|---|
| 1.x | ✅ |
A step points to an operation or a workflow of a source description with a runtime expression, such as $sourceDescriptions.<name>.<workflowId>. The Arazzo specification requires the referenced operation or workflow to exist in one of the sourceDescriptions. A reference with a name that is not in the sourceDescriptions list cannot be resolved, so the step cannot run.
The spec-sourceDescriptions-defined rule reports such a reference in the following fields:
operationPathandworkflowIdof a step.workflowIdof a success or a failure action.channelPathanddependsOnof a step (Arazzo 1.1).
The rule checks only the name of the source description. It does not check that the operation or the workflow exists in that source description. The spec-step-operationId-resolved rule checks the operationId of a step. The workflow-dependsOn rule checks the references in the dependsOn list of a workflow.
| Option | Type | Description |
|---|---|---|
| severity | string | Possible values: off, warn, error. Default: error (in recommended configuration). |
An example configuration:
rules:
spec-sourceDescriptions-defined: error
Given the following configuration:
rules:
spec-sourceDescriptions-defined: error
Example of an incorrect reference to a source description that is not defined:
sourceDescriptions:
- name: cafe-api
type: openapi
url: cafe.yaml
workflows:
- workflowId: place-order
steps:
- stepId: create-order
operationPath: '{$sourceDescriptions.bakery-api.url}#/paths/~1orders/post'
Example of a correct reference to a defined source description:
sourceDescriptions:
- name: cafe-api
type: openapi
url: cafe.yaml
workflows:
- workflowId: place-order
steps:
- stepId: create-order
operationPath: '{$sourceDescriptions.cafe-api.url}#/paths/~1orders/post'