A step must use only one of its mutually exclusive operation fields.
| Arazzo | Compatibility |
|---|---|
| 1.x | ✅ |
The Arazzo specification defines several fields that point a step to the operation or workflow it executes. These fields are mutually exclusive: a step must reference exactly one of them. This rule reports a step that uses more than one of these fields at the same time.
In Arazzo 1.0.x, the mutually exclusive fields are: operationId, operationPath, workflowId. In Arazzo 1.1.0, operationId, operationPath, workflowId, and channelPath are mutually exclusive.
| Option | Type | Description |
|---|---|---|
| severity | string | Possible values: off, warn, error. Default off. |
An example configuration:
rules:
spec-step-mutually-exclusive-fields: errorGiven the following configuration:
rules:
spec-step-mutually-exclusive-fields: errorExample of an incorrect step that uses two mutually exclusive fields:
workflows:
- workflowId: place-order
steps:
- stepId: list-menu-items
operationId: cafe-api.listMenuItems
workflowId: place-orderExample of a correct step that uses a single operation field:
workflows:
- workflowId: place-order
steps:
- stepId: list-menu-items
operationId: cafe-api.listMenuItems