Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
365 changes: 214 additions & 151 deletions src/arazzo.md

Large diffs are not rendered by default.

144 changes: 118 additions & 26 deletions src/schemas/validation/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ $defs:
enum:
- arazzo
- openapi
- asyncapi
required:
- name
- url
Expand Down Expand Up @@ -156,7 +157,12 @@ $defs:
$comment: https://spec.openapis.org/arazzo/v1.1#step-object'
description: |-
Describes a single workflow step which MAY be a call to an
API operation (OpenAPI Operation Object or another Workflow Object)
API operation (OpenAPI Operation Object or AsyncAPI Operation Object or another Workflow Object)
oneOf:
- $ref: '#/$defs/openapi-step-object'
- $ref: '#/$defs/asyncapi-step-object'
- $ref: '#/$defs/workflow-step-object'
step-object-base:
type: object
properties:
stepId:
Expand All @@ -169,12 +175,17 @@ $defs:
operationId:
description: The name of an existing, resolvable operation, as defined with a unique operationId and existing within one of the sourceDescriptions
type: string
operationPath:
description: A reference to a Source combined with a JSON Pointer to reference an operation
type: string
workflowId:
description: The workflowId referencing an existing workflow within the Arazzo description
$ref: '#workflowId'
timeout:
description: The duration in milliseconds to wait before timing out the step
type: integer
dependsOn:
description: Specifies a list of step identifiers that must complete (or be waited for) before the current step can begin execution. Steps referred by dependsOn SHOULD be non-blocking/async steps. If you depend on a step from another workflow, you MUST use the full reference format with the workflow id.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please clarify, why step mentioned in dependsOn can't be synchronous?
Steps referred by dependsOn SHOULD be non-blocking/async steps.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like can async Step depend on Sync step results?

Copy link
Author

@nashjain nashjain Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically the spec does not stop you. But the intent is for a step (sync or async) to use the output of an asynchronous step. Hence we've used the language around SHOULD and not MUST.

With an async step, once you invoke it, you would move forward, as it is a non-blocking call. However, with a sync step, since it is blocking, you would anyway need to wait for it to complete.

Is there a use case you've in mind for which you want to depend on a sync step?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m wondering in what case we would need to make the dependency explicit. It seems redundant to me, since each step has to be executed (including setting the outputs) before we proceed to another step. Otherwise it will create the possibility to execute steps in different order (e.g., set the dependency to a next step).

Also, what does '... step identifiers that must complete (or be waited for)'? actually mean? How do we determine that an async step has completed? What exactly are we waiting for?

type: array
uniqueItems: true
minItems: 1
items:
type: string
pattern: ^\$(?:workflows\.[^.]+\.)?steps\.[^.]+$
parameters:
description: A list of parameters that MUST be passed to an operation or workflow as referenced by operationId, operationPath, or workflowId
type: array
Expand Down Expand Up @@ -217,14 +228,21 @@ $defs:
- $ref: '#/$defs/selector-object'
required:
- stepId
oneOf:
- required:
- operationId
- required:
- operationPath
- required:
- workflowId
openapi-step-object:
allOf:
- $ref: '#/$defs/step-object-base'
- type: object
properties:
operationPath:
description: A reference to a Source combined with a JSON Pointer to reference an operation
type: string
successCriteria:
description: A list of assertions to determine the success of the step
type: array
uniqueItems: true
minItems: 1
items:
$ref: '#/$defs/criterion-object'
- if:
oneOf:
- required:
Expand All @@ -240,21 +258,94 @@ $defs:
- $ref: '#/$defs/parameter-object'
required:
- in
- oneOf:
- required:
- operationId
- required:
- operationPath
$ref: '#/$defs/specification-extensions'
unevaluatedProperties: false
asyncapi-step-object:
allOf:
- $ref: '#/$defs/step-object-base'
- type: object
properties:
channelPath:
description: A reference to a Source combined with a JSON Pointer to reference an async channel
type: string
correlationId:
description: ID to correlate async responses with their requests, only specified for async receive steps
type:
- string
- number
- boolean
- object
- array
action:
description: Specifies the intended operation on the async channel, indicating whether the action is sending data to the channel or receiving data from the channel
enum:
- send
- receive
successCriteria:
description: A list of assertions to determine the success of the step
type: array
uniqueItems: true
minItems: 0
items:
$ref: '#/$defs/criterion-object'
required:
- action
- if:
required:
- workflowId
oneOf:
- required:
- operationId
- required:
- channelPath
then:
properties:
parameters:
items:
oneOf:
- $ref: '#/$defs/parameter-object'
- $ref: '#/$defs/reusable-object'
- $ref: '#/$defs/parameter-object'
required:
- in
- if:
required:
- correlationId
then:
properties:
action:
const: receive
required:
- action
- oneOf:
- required:
- operationId
- required:
- channelPath
$ref: '#/$defs/specification-extensions'
unevaluatedProperties: false
workflow-step-object:
allOf:
- $ref: '#/$defs/step-object-base'
- type: object
properties:
workflowId:
description: The workflowId referencing an existing workflow within the Arazzo description
$ref: '#workflowId'
parameters:
items:
oneOf:
- $ref: '#/$defs/parameter-object'
- $ref: '#/$defs/reusable-object'
required:
- workflowId
$ref: '#/$defs/specification-extensions'
unevaluatedProperties: false
request-body-object:
$comment: https://spec.openapis.org/arazzo/v1.1#request-body-object
description: The request body to pass to an operation as referenced by operationId or operationPath
description: The request body to pass to an operation as referenced by operationId or operationPath or channelPath
type: object
properties:
contentType:
Expand Down Expand Up @@ -287,7 +378,7 @@ $defs:
description: The type of condition to be applied or a reference to an expression type object
oneOf:
- type: string
enum:
enum:
- simple
- regex
- jsonpath
Expand Down Expand Up @@ -330,10 +421,10 @@ $defs:
then:
properties:
version:
enum:
enum:
- rfc9535
- draft-goessner-dispatch-jsonpath-00

- if:
required:
- type
Expand All @@ -356,7 +447,7 @@ $defs:
then:
properties:
version:
const: rfc6901
const: rfc6901
$ref: '#/$defs/specification-extensions'
success-action-object:
$comment: https://spec.openapis.org/arazzo/v1.1#success-action-object
Expand Down Expand Up @@ -435,7 +526,7 @@ $defs:
description: A list of parameters that MUST be passed to a workflow as referenced by workflowId
type: array
uniqueItems: true
items: true
items: true
retryAfter:
description: A non-negative decimal indicating the seconds to delay after the step failure before another attempt SHALL be made
type: number
Expand Down Expand Up @@ -475,7 +566,7 @@ $defs:
- parameters
then:
required:
- workflowId
- workflowId
required:
- name
- type
Expand Down Expand Up @@ -516,6 +607,7 @@ $defs:
- query
- header
- cookie
- channel
value:
description: The value to pass in the parameter
oneOf:
Expand All @@ -525,7 +617,7 @@ $defs:
- array
- number
- 'null'
- $ref: '#/$defs/selector-object'
- $ref: '#/$defs/selector-object'
required:
- name
- value
Expand All @@ -544,7 +636,7 @@ $defs:
The selector expression type to use (e.g., `jsonpath`, `xpath`, or `jsonpointer`).
Should an alternate version be required, the Expression Type Object may be used instead.
If omitted, defaults to JSON Pointer for `application/json` or XPath for XML-based media types.
$ref: '#/$defs/selector-type'
$ref: '#/$defs/selector-type'
value:
description: >
The value to set at the location defined by the target. May be a literal,
Expand Down
81 changes: 81 additions & 0 deletions src/specifications/pet-asyncapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
asyncapi: 3.0.0

info:
title: Simple Pet Purchase API
version: "1.0.0"

servers:
localKafka:
host: localhost:9092
protocol: kafka

channels:
place-order:
address: place-order
messages:
placeOrder.message:
$ref: "#/components/messages/OrderRequest"

confirm-order:
address: confirm-order
messages:
confirmOrder.message:
$ref: "#/components/messages/OrderResponse"

operations:
placeOrder:
description: Place an order
action: receive
channel:
$ref: "#/channels/place-order"
messages:
- $ref: "#/channels/place-order/messages/placeOrder.message"
reply:
channel:
$ref: "#/channels/confirm-order"
messages:
- $ref: "#/channels/confirm-order/messages/confirmOrder.message"

components:
messages:
OrderRequest:
contentType: application/json
correlationId:
description: Identifier that correlates this request with a response
location: "$message.header#/orderRequestId"
headers:
type: object
required:
- orderRequestId
properties:
orderRequestId:
type: string
description: Unique ID for tracking the order flow
payload:
type: object
required:
- petId
properties:
petId:
type: integer

OrderResponse:
contentType: application/json
correlationId:
description: Identifier that correlates this response with a request
location: "$message.header#/orderRequestId"
headers:
type: object
required:
- orderRequestId
properties:
orderRequestId:
type: string
description: Unique ID for tracking the order flow
payload:
type: object
required:
- orderId
properties:
orderId:
type: integer
13 changes: 13 additions & 0 deletions tests/schema/fail/channel-path-is-invalid-for-openapi.arazzo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
arazzo: 1.1.0
info:
title: Minimal Arazzo Example for AsyncAPI
version: 1.0.0
sourceDescriptions:
- name: exampleAPI
url: https://example.com/openapi.yaml
type: openapi
workflows:
- workflowId: basicWorkflow
steps:
- stepId: step1
channelPath: createUser
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
arazzo: 1.1.0
info:
title: Minimal Arazzo Example for AsyncAPI
version: 1.0.0
sourceDescriptions:
- name: exampleAPI
url: https://example.com/asyncapi.yaml
type: asyncapi
workflows:
- workflowId: basicWorkflow
steps:
- stepId: step1
operationId: createUser
action: send
correlationId: invalid
14 changes: 14 additions & 0 deletions tests/schema/fail/invalid-async.arazzo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
arazzo: 1.1.0
info:
title: Minimal Arazzo Example for AsyncAPI
version: 1.0.0
sourceDescriptions:
- name: exampleAPI
url: https://example.com/asyncapi.yaml
type: asyncapi
workflows:
- workflowId: basicWorkflow
steps:
- stepId: step1
operationId: createUser
action: invalid
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
arazzo: 1.1.0
info:
title: Minimal Arazzo Example for AsyncAPI with Correlation ID for Receive Action
version: 1.0.0
sourceDescriptions:
- name: exampleAPI
url: https://example.com/asyncapi.yaml
type: asyncapi
workflows:
- workflowId: basicWorkflow
steps:
- stepId: step1
operationId: createUser
action: receive
correlationId: id123
Loading