Skip to content
Open
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
145 changes: 127 additions & 18 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 @@ -152,9 +153,20 @@ $defs:
$comment: https://spec.openapis.org/arazzo/v1.0#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:
stepType:
description: Indicates the kind of workflow step, either OpenAPI or AsyncAPI, defaults to OpenAPI if not specified
enum:
- openapi
- asyncapi
default: openapi
stepId:
description: Unique string to represent the step
$anchor: stepId
Expand All @@ -165,12 +177,23 @@ $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
fork:
description: Specifies whether the step should be forked into parallel execution, allowing for non-blocking execution
type: boolean
join:
description: Manages the synchronization of forked steps before the execution proceeds
oneOf:
- type: boolean
description: If set to `true`, the current step will wait until **all** forked steps have completed
- type: array
description: A specified list of step IDs that need to finish before this step can proceed
uniqueItems: true
minItems: 1
items:
$ref: '#stepId'
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 @@ -209,14 +232,24 @@ $defs:
type: string
required:
- stepId
oneOf:
- required:
- operationId
- required:
- operationPath
- required:
- workflowId
openapi-step-object:
allOf:
- $ref: '#/$defs/step-object-base'
- type: object
properties:
stepType:
description: Identifier for OpenAPI step
const: openapi
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 @@ -228,25 +261,100 @@ $defs:
parameters:
items:
oneOf:
- $ref: '#/$defs/reusable-object'
- $ref: '#/$defs/parameter-object'
required:
- in
- $ref: '#/$defs/reusable-object'
- oneOf:
- required:
- operationId
- required:
- operationPath
$ref: '#/$defs/specification-extensions'
unevaluatedProperties: false
asyncapi-step-object:
allOf:
- $ref: '#/$defs/step-object-base'
- type: object
properties:
stepType:
description: Identifier for AsyncAPI step
const: asyncapi
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:
- stepType
- if:
required:
- workflowId
oneOf:
- required:
- operationId
- required:
- channelPath
then:
properties:
parameters:
items:
oneOf:
- $ref: '#/$defs/parameter-object'
required:
- in
- $ref: '#/$defs/reusable-object'
- if:
required:
- correlationId
then:
properties:
action:
const: receive
required:
- action
- oneOf:
- required:
- operationId
- required:
- channelPath
- action
$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
request-body-object:
$comment: https://spec.openapis.org/arazzo/v1.0#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 @@ -471,6 +579,7 @@ $defs:
- query
- header
- cookie
- channel
value:
description: The value to pass in the parameter
type:
Expand Down