Skip to content

Commit 6a54a56

Browse files
committed
fix: update operationId and correlationId references in arazzo.md AND add pattern for dependsOn in schema.yaml to clarify that it can ref to a step from another workflow
1 parent 4a188bb commit 6a54a56

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/arazzo.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ workflows:
149149
steps:
150150
- stepId: loginStep
151151
description: This step demonstrates the user login step
152-
operationId: loginUser
152+
operationId: $sourceDescriptions.petstoreDescription.loginUser
153153
parameters:
154154
# parameters to inject into the loginUser operation (parameter name must be resolvable at the referenced operation and the value is determined using {expression} syntax)
155155
- name: username
@@ -326,7 +326,7 @@ Describes a single workflow step which MAY be a call to an API operation ([OpenA
326326
##### Fixed Fields
327327

328328
| Field Name | Type | Description |
329-
| ------------------------------------------------- | :--------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
329+
| ------------------------------------------------- | :--------------------------------------------------------------------------------------: |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
330330
| <a name="stepDescription"></a>description | `string` | A description of the step. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. |
331331
| <a name="stepId"></a>stepId | `string` | **REQUIRED**. Unique string to represent the step. The `stepId` MUST be unique amongst all steps described in the workflow. The `stepId` value is **case-sensitive**. Tools and libraries MAY use the `stepId` to uniquely identify a workflow step, therefore, it is RECOMMENDED to follow common programming naming conventions. SHOULD conform to the regular expression `[A-Za-z0-9_\-]+`. |
332332
| <a name="stepOperationId"></a>operationId | `string` | The name of an existing, resolvable operation, as defined with a unique `operationId` and existing within one of the `sourceDescriptions`. The referenced operation will be invoked by this workflow step. If multiple (non `arazzo` type) `sourceDescriptions` are defined, then the `operationId` MUST be specified using a [Runtime Expression](#runtime-expressions) (e.g., `$sourceDescriptions.<name>.<operationId>`) to avoid ambiguity or potential clashes. This field is mutually exclusive of the `operationPath` and `workflowId` fields respectively. |
@@ -342,7 +342,7 @@ Describes a single workflow step which MAY be a call to an API operation ([OpenA
342342
| <a name="stepTimeout"></a>timeout | `integer` | The maximum number of milli-seconds to wait for the step to complete before aborting and failing the step. Consequently this will fail the workflow unless failureActions are defined. |
343343
| <a name="stepCorrelationId"></a>correlationId | `string` | A correlationId in AsyncAPI links a request with its response (or more broadly, to trace a single logical transaction across multiple asynchronous messages). Only applicable to `asyncapi` steps with action `receive` and has to be in-sync with correlationId defined in the AsyncAPI document. |
344344
| <a name="stepAction"></a>action | `send or receive` | Describes the intent of the message flow. Indicates whether the step will send (publish) or receive (subscribe) to a message on a channel described in an AsyncAPI document, Only applicable for `asyncapi` steps. |
345-
| <a name="stepDependsOn"></a>dependsOn | List[`string`] | A list of steps that MUST be completed before this step can be executed. Each value provided MUST be a `stepdId`. The keys must follow the regular expression: `^\$steps.<stepId>$`. |
345+
| <a name="stepDependsOn"></a>dependsOn | List[`string`] | A list of steps that MUST be completed before this step can be executed. Each value provided MUST be a `stepdId`. If you depend on a step from another workflow, you MUST use the full reference format with the workflow id. The keys MUST follow the regular expression: `^\$(?:workflows\.[^.]+\.)?steps\.[^.]+$`. |
346346

347347
This object MAY be extended with [Specification Extensions](#specification-extensions).
348348

@@ -429,7 +429,7 @@ An async step example:
429429
- stepId: confirmOrder
430430
description: This step demonstrates the action of receiving a message payload to confirm an order
431431
operationId: $sourceDescriptions.asyncOrderApi.confirmOrder
432-
correlationId: $steps.placeOrder.outputs.requestId
432+
correlationId: $inputs.correlationId
433433
action: receive
434434
dependsOn: $steps.placeOrder
435435
timeout: 6000

src/schemas/validation/schema.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,13 @@ $defs:
175175
description: The duration in milliseconds to wait before timing out the step
176176
type: integer
177177
dependsOn:
178-
description: Specifies a list of step identifiers that must complete (or be waited for) before the current step can begin execution
178+
description: Specifies a list of step identifiers that must complete (or be waited for) before the current step can begin execution. If you depend on a step from another workflow, you MUST use the full reference format with the workflow id.
179179
type: array
180180
uniqueItems: true
181181
minItems: 1
182182
items:
183-
$ref: '#stepId'
183+
type: string
184+
pattern: ^\\$(?:workflows\\.[^.]+\\.)?steps\\.[^.]+$
184185
parameters:
185186
description: A list of parameters that MUST be passed to an operation or workflow as referenced by operationId, operationPath, or workflowId
186187
type: array

0 commit comments

Comments
 (0)