You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also cleaned up the spec to make it very clear that step-object can be oneOf openapi-step-object or asyncapi-step-object or workflow-step-object
For AsyncAPI we really need support for timeout, fork and join. However, these are also useful for OpenAPI so added it at the base step object.
For OpenAPI we need at least one successCriteria but for AsyncAPI it can be optional.
Describes a single workflow step which MAY be a call to an
155
-
API operation (OpenAPI Operation Object or another Workflow Object)
156
+
API operation (OpenAPI Operation Object or AsyncAPI Operation Object or another Workflow Object)
157
+
oneOf:
158
+
- $ref: '#/$defs/openapi-step-object'
159
+
- $ref: '#/$defs/asyncapi-step-object'
160
+
- $ref: '#/$defs/workflow-step-object'
161
+
step-object-base:
156
162
type: object
157
163
properties:
164
+
stepType:
165
+
description: Indicates the kind of workflow step, either OpenAPI or AsyncAPI, defaults to OpenAPI if not specified
166
+
enum:
167
+
- openapi
168
+
- asyncapi
169
+
default: openapi
158
170
stepId:
159
171
description: Unique string to represent the step
160
172
$anchor: stepId
@@ -165,12 +177,23 @@ $defs:
165
177
operationId:
166
178
description: The name of an existing, resolvable operation, as defined with a unique operationId and existing within one of the sourceDescriptions
167
179
type: string
168
-
operationPath:
169
-
description: A reference to a Source combined with a JSON Pointer to reference an operation
170
-
type: string
171
-
workflowId:
172
-
description: The workflowId referencing an existing workflow within the Arazzo description
173
-
$ref: '#workflowId'
180
+
timeout:
181
+
description: The duration in milliseconds to wait before timing out the step
182
+
type: integer
183
+
fork:
184
+
description: Specifies whether the step should be forked into parallel execution, allowing for non-blocking execution
185
+
type: boolean
186
+
join:
187
+
description: Manages the synchronization of forked steps before the execution proceeds
188
+
oneOf:
189
+
- type: boolean
190
+
description: If set to `true`, the current step will wait until **all** forked steps have completed
191
+
- type: array
192
+
description: A specified list of step IDs that need to finish before this step can proceed
193
+
uniqueItems: true
194
+
minItems: 1
195
+
items:
196
+
$ref: '#stepId'
174
197
parameters:
175
198
description: A list of parameters that MUST be passed to an operation or workflow as referenced by operationId, operationPath, or workflowId
176
199
type: array
@@ -209,14 +232,24 @@ $defs:
209
232
type: string
210
233
required:
211
234
- stepId
212
-
oneOf:
213
-
- required:
214
-
- operationId
215
-
- required:
216
-
- operationPath
217
-
- required:
218
-
- workflowId
235
+
openapi-step-object:
219
236
allOf:
237
+
- $ref: '#/$defs/step-object-base'
238
+
- type: object
239
+
properties:
240
+
stepType:
241
+
description: Identifier for OpenAPI step
242
+
const: openapi
243
+
operationPath:
244
+
description: A reference to a Source combined with a JSON Pointer to reference an operation
245
+
type: string
246
+
successCriteria:
247
+
description: A list of assertions to determine the success of the step
248
+
type: array
249
+
uniqueItems: true
250
+
minItems: 1
251
+
items:
252
+
$ref: '#/$defs/criterion-object'
220
253
- if:
221
254
oneOf:
222
255
- required:
@@ -228,25 +261,100 @@ $defs:
228
261
parameters:
229
262
items:
230
263
oneOf:
231
-
- $ref: '#/$defs/reusable-object'
232
264
- $ref: '#/$defs/parameter-object'
233
265
required:
234
266
- in
267
+
- $ref: '#/$defs/reusable-object'
268
+
- oneOf:
269
+
- required:
270
+
- operationId
271
+
- required:
272
+
- operationPath
273
+
$ref: '#/$defs/specification-extensions'
274
+
unevaluatedProperties: false
275
+
asyncapi-step-object:
276
+
allOf:
277
+
- $ref: '#/$defs/step-object-base'
278
+
- type: object
279
+
properties:
280
+
stepType:
281
+
description: Identifier for AsyncAPI step
282
+
const: asyncapi
283
+
channelPath:
284
+
description: A reference to a Source combined with a JSON Pointer to reference an async channel
285
+
type: string
286
+
correlationId:
287
+
description: ID to correlate async responses with their requests, only specified for async receive steps
288
+
type:
289
+
- string
290
+
- number
291
+
- boolean
292
+
- object
293
+
- array
294
+
action:
295
+
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
296
+
enum:
297
+
- "send"
298
+
- "receive"
299
+
successCriteria:
300
+
description: A list of assertions to determine the success of the step
301
+
type: array
302
+
uniqueItems: true
303
+
minItems: 0
304
+
items:
305
+
$ref: '#/$defs/criterion-object'
306
+
required:
307
+
- stepType
235
308
- if:
236
-
required:
237
-
- workflowId
309
+
oneOf:
310
+
- required:
311
+
- operationId
312
+
- required:
313
+
- channelPath
238
314
then:
239
315
properties:
240
316
parameters:
241
317
items:
242
318
oneOf:
243
319
- $ref: '#/$defs/parameter-object'
320
+
required:
321
+
- in
244
322
- $ref: '#/$defs/reusable-object'
323
+
- if:
324
+
required:
325
+
- correlationId
326
+
then:
327
+
properties:
328
+
action:
329
+
const: receive
330
+
required:
331
+
- action
332
+
- oneOf:
333
+
- required:
334
+
- operationId
335
+
- required:
336
+
- channelPath
337
+
- action
245
338
$ref: '#/$defs/specification-extensions'
246
339
unevaluatedProperties: false
340
+
workflow-step-object:
341
+
allOf:
342
+
- $ref: '#/$defs/step-object-base'
343
+
- type: object
344
+
properties:
345
+
workflowId:
346
+
description: The workflowId referencing an existing workflow within the Arazzo description
0 commit comments