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 and dependOn. However, these are also useful for OpenAPI/Workflow steps 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:
158
164
stepId:
@@ -165,12 +171,16 @@ $defs:
165
171
operationId:
166
172
description: The name of an existing, resolvable operation, as defined with a unique operationId and existing within one of the sourceDescriptions
167
173
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'
174
+
timeout:
175
+
description: The duration in milliseconds to wait before timing out the step
176
+
type: integer
177
+
dependsOn:
178
+
description: Specifies a list of step identifiers that must complete (or be waited for) before the current step can begin execution
179
+
type: array
180
+
uniqueItems: true
181
+
minItems: 1
182
+
items:
183
+
$ref: '#stepId'
174
184
parameters:
175
185
description: A list of parameters that MUST be passed to an operation or workflow as referenced by operationId, operationPath, or workflowId
176
186
type: array
@@ -209,14 +219,21 @@ $defs:
209
219
type: string
210
220
required:
211
221
- stepId
212
-
oneOf:
213
-
- required:
214
-
- operationId
215
-
- required:
216
-
- operationPath
217
-
- required:
218
-
- workflowId
222
+
openapi-step-object:
219
223
allOf:
224
+
- $ref: '#/$defs/step-object-base'
225
+
- type: object
226
+
properties:
227
+
operationPath:
228
+
description: A reference to a Source combined with a JSON Pointer to reference an operation
229
+
type: string
230
+
successCriteria:
231
+
description: A list of assertions to determine the success of the step
232
+
type: array
233
+
uniqueItems: true
234
+
minItems: 1
235
+
items:
236
+
$ref: '#/$defs/criterion-object'
220
237
- if:
221
238
oneOf:
222
239
- required:
@@ -228,25 +245,96 @@ $defs:
228
245
parameters:
229
246
items:
230
247
oneOf:
231
-
- $ref: '#/$defs/reusable-object'
232
248
- $ref: '#/$defs/parameter-object'
233
249
required:
234
250
- in
251
+
- $ref: '#/$defs/reusable-object'
252
+
- oneOf:
253
+
- required:
254
+
- operationId
255
+
- required:
256
+
- operationPath
257
+
$ref: '#/$defs/specification-extensions'
258
+
unevaluatedProperties: false
259
+
asyncapi-step-object:
260
+
allOf:
261
+
- $ref: '#/$defs/step-object-base'
262
+
- type: object
263
+
properties:
264
+
channelPath:
265
+
description: A reference to a Source combined with a JSON Pointer to reference an async channel
266
+
type: string
267
+
correlationId:
268
+
description: ID to correlate async responses with their requests, only specified for async receive steps
269
+
type:
270
+
- string
271
+
- number
272
+
- boolean
273
+
- object
274
+
- array
275
+
action:
276
+
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
277
+
enum:
278
+
- send
279
+
- receive
280
+
successCriteria:
281
+
description: A list of assertions to determine the success of the step
282
+
type: array
283
+
uniqueItems: true
284
+
minItems: 0
285
+
items:
286
+
$ref: '#/$defs/criterion-object'
287
+
required:
288
+
- action
235
289
- if:
236
-
required:
237
-
- workflowId
290
+
oneOf:
291
+
- required:
292
+
- operationId
293
+
- required:
294
+
- channelPath
238
295
then:
239
296
properties:
240
297
parameters:
241
298
items:
242
299
oneOf:
243
300
- $ref: '#/$defs/parameter-object'
301
+
required:
302
+
- in
244
303
- $ref: '#/$defs/reusable-object'
304
+
- if:
305
+
required:
306
+
- correlationId
307
+
then:
308
+
properties:
309
+
action:
310
+
const: receive
311
+
required:
312
+
- action
313
+
- oneOf:
314
+
- required:
315
+
- operationId
316
+
- required:
317
+
- channelPath
245
318
$ref: '#/$defs/specification-extensions'
246
319
unevaluatedProperties: false
320
+
workflow-step-object:
321
+
allOf:
322
+
- $ref: '#/$defs/step-object-base'
323
+
- type: object
324
+
properties:
325
+
workflowId:
326
+
description: The workflowId referencing an existing workflow within the Arazzo description
0 commit comments