Skip to content

Commit 5af7a2d

Browse files
nashjainketan
authored andcommitted
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 daa66c5 commit 5af7a2d

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

src/arazzo.md

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

330330
| Field Name | Type | Description |
331-
| ------------------------------------------------- | :--------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
331+
| ------------------------------------------------- | :--------------------------------------------------------------------------------------: |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
332332
| <a name="stepDescription"></a>description | `string` | A description of the step. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. |
333333
| <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_\-]+`. |
334334
| <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. |
@@ -344,7 +344,7 @@ Describes a single workflow step which MAY be a call to an API operation ([OpenA
344344
| <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. |
345345
| <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. |
346346
| <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. |
347-
| <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>$`. |
347+
| <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\.[^.]+$`. |
348348

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

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

src/schemas/validation/schema.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,18 +179,13 @@ $defs:
179179
description: The duration in milliseconds to wait before timing out the step
180180
type: integer
181181
dependsOn:
182-
description: Specifies a list of step identifiers that must complete (or be waited for) before the current step can begin execution
182+
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.
183183
type: array
184184
uniqueItems: true
185185
minItems: 1
186186
items:
187-
$ref: '#stepId'
188-
operationPath:
189-
description: A reference to a Source combined with a JSON Pointer to reference an operation
190-
type: string
191-
workflowId:
192-
description: The workflowId referencing an existing workflow within the Arazzo description
193-
$ref: '#workflowId'
187+
type: string
188+
pattern: ^\\$(?:workflows\\.[^.]+\\.)?steps\\.[^.]+$
194189
parameters:
195190
description: A list of parameters that MUST be passed to an operation or workflow as referenced by operationId, operationPath, or workflowId
196191
type: array

0 commit comments

Comments
 (0)