Skip to content

Commit d3190f4

Browse files
committed
[Fix #379] Update to last version of the schema
1 parent 6bcc668 commit d3190f4

File tree

1 file changed

+107
-76
lines changed

1 file changed

+107
-76
lines changed

api/src/main/resources/schema/workflow.yaml

Lines changed: 107 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ properties:
103103
description: Schedules the workflow
104104
$defs:
105105
taskList:
106+
title: TaskList
106107
type: array
107108
items:
108109
type: object
@@ -181,10 +182,8 @@ $defs:
181182
type: object
182183
description: The payload to call the AsyncAPI operation with, if any.
183184
authentication:
185+
$ref: '#/$defs/referenceableAuthenticationPolicy'
184186
description: The authentication policy, if any, to use when calling the AsyncAPI operation.
185-
oneOf:
186-
- $ref: '#/$defs/authenticationPolicy'
187-
- type: string
188187
required: [ document, operationRef ]
189188
additionalProperties: false
190189
description: Defines the AsyncAPI call to perform.
@@ -216,14 +215,12 @@ $defs:
216215
description: The hostname of the GRPC service to call.
217216
port:
218217
type: integer
219-
min: 0
220-
max: 65535
218+
minimum: 0
219+
maximum: 65535
221220
description: The port number of the GRPC service to call.
222221
authentication:
222+
$ref: '#/$defs/referenceableAuthenticationPolicy'
223223
description: The endpoint's authentication policy, if any.
224-
oneOf:
225-
- $ref: '#/$defs/authenticationPolicy'
226-
- type: string
227224
required: [ name, host ]
228225
method:
229226
type: string
@@ -293,10 +290,8 @@ $defs:
293290
additionalProperties: true
294291
description: A name/value mapping of the parameters of the OpenAPI operation to call.
295292
authentication:
293+
$ref: '#/$defs/referenceableAuthenticationPolicy'
296294
description: The authentication policy, if any, to use when calling the OpenAPI operation.
297-
oneOf:
298-
- $ref: '#/$defs/authenticationPolicy'
299-
- type: string
300295
output:
301296
type: string
302297
enum: [ raw, content, response ]
@@ -320,6 +315,7 @@ $defs:
320315
additionalProperties: true
321316
description: A name/value mapping of the parameters, if any, to call the function with.
322317
forkTask:
318+
title: ForkTask
323319
description: Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output.
324320
$ref: '#/$defs/taskBase'
325321
type: object
@@ -337,6 +333,7 @@ $defs:
337333
type: boolean
338334
default: false
339335
doTask:
336+
title: DoTask
340337
description: Allows to execute a list of tasks in sequence
341338
$ref: '#/$defs/taskBase'
342339
type: object
@@ -346,6 +343,7 @@ $defs:
346343
do:
347344
$ref: '#/$defs/taskList'
348345
emitTask:
346+
title: EmitTask
349347
description: Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services.
350348
$ref: '#/$defs/taskBase'
351349
type: object
@@ -383,6 +381,7 @@ $defs:
383381
additionalProperties: true
384382
required: [ event ]
385383
forTask:
384+
title: ForTask
386385
description: Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets.
387386
$ref: '#/$defs/taskBase'
388387
type: object
@@ -410,6 +409,7 @@ $defs:
410409
do:
411410
$ref: '#/$defs/taskList'
412411
listenTask:
412+
title: ListenTask
413413
description: Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems.
414414
$ref: '#/$defs/taskBase'
415415
type: object
@@ -424,6 +424,7 @@ $defs:
424424
description: Defines the event(s) to listen to.
425425
required: [ to ]
426426
raiseTask:
427+
title: RaiseTask
427428
description: Intentionally triggers and propagates errors.
428429
$ref: '#/$defs/taskBase'
429430
type: object
@@ -438,6 +439,7 @@ $defs:
438439
description: Defines the error to raise.
439440
required: [ error ]
440441
runTask:
442+
title: RunTask
441443
description: Provides the capability to execute external containers, shell commands, scripts, or workflows.
442444
$ref: '#/$defs/taskBase'
443445
type: object
@@ -546,6 +548,7 @@ $defs:
546548
required: [ workflow ]
547549
description: Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units.
548550
setTask:
551+
title: SetTask
549552
description: A task used to set data
550553
$ref: '#/$defs/taskBase'
551554
type: object
@@ -558,6 +561,7 @@ $defs:
558561
additionalProperties: true
559562
description: The data to set
560563
switchTask:
564+
title: SwitchTask
561565
description: Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria
562566
$ref: '#/$defs/taskBase'
563567
type: object
@@ -575,17 +579,17 @@ $defs:
575579
additionalProperties:
576580
type: object
577581
title: SwitchCase
582+
required:
583+
- then
578584
properties:
579-
name:
580-
type: string
581-
description: The case's name.
582585
when:
583586
type: string
584587
description: A runtime expression used to determine whether or not the case matches.
585588
then:
586589
$ref: '#/$defs/flowDirective'
587590
description: The flow directive to execute when the case matches.
588591
tryTask:
592+
title: TryTask
589593
description: Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones.
590594
$ref: '#/$defs/taskBase'
591595
type: object
@@ -617,6 +621,7 @@ $defs:
617621
description: The definition of the task(s) to run when catching an error.
618622
$ref: '#/$defs/taskList'
619623
waitTask:
624+
title: WaitTask
620625
description: Allows workflows to pause or delay their execution for a specified period of time.
621626
$ref: '#/$defs/taskBase'
622627
type: object
@@ -627,85 +632,109 @@ $defs:
627632
description: The amount of time to wait.
628633
$ref: '#/$defs/duration'
629634
flowDirective:
630-
additionalProperties: false
631635
anyOf:
632636
- type: string
633637
enum: [ continue, exit, end ]
634638
default: continue
635639
- type: string
640+
referenceableAuthenticationPolicy:
641+
type: object
642+
oneOf:
643+
- title: AuthenticationPolicyReference
644+
properties:
645+
use:
646+
type: string
647+
minLength: 1
648+
description: The name of the authentication policy to use
649+
required: [use]
650+
- $ref: '#/$defs/authenticationPolicy'
651+
secretBasedAuthenticationPolicy:
652+
type: object
653+
properties:
654+
use:
655+
type: string
656+
minLength: 1
657+
description: The name of the authentication policy to use
658+
required: [use]
636659
authenticationPolicy:
637660
type: object
638661
oneOf:
639662
- title: BasicAuthenticationPolicy
640663
properties:
641664
basic:
642665
type: object
643-
properties:
644-
username:
645-
type: string
646-
description: The username to use.
647-
password:
648-
type: string
649-
description: The password to use.
650-
required: [ username, password ]
666+
oneOf:
667+
- properties:
668+
username:
669+
type: string
670+
description: The username to use.
671+
password:
672+
type: string
673+
description: The password to use.
674+
required: [ username, password ]
675+
- $ref: '#/$defs/secretBasedAuthenticationPolicy'
651676
required: [ basic ]
652677
description: Use basic authentication.
653678
- title: BearerAuthenticationPolicy
654679
properties:
655680
bearer:
656681
type: object
657-
properties:
658-
token:
659-
type: string
660-
description: The bearer token to use.
661-
required: [ token ]
682+
oneOf:
683+
- properties:
684+
token:
685+
type: string
686+
description: The bearer token to use.
687+
required: [ token ]
688+
- $ref: '#/$defs/secretBasedAuthenticationPolicy'
662689
required: [ bearer ]
663690
description: Use bearer authentication.
664691
- title: OAuth2AuthenticationPolicy
665692
properties:
666693
oauth2:
667694
type: object
668-
properties:
669-
authority:
670-
type: string
671-
format: uri
672-
description: The URI that references the OAuth2 authority to use.
673-
grant:
674-
type: string
675-
description: The grant type to use.
676-
client:
677-
type: object
678-
properties:
679-
id:
695+
oneOf:
696+
- properties:
697+
authority:
680698
type: string
681-
description: The client id to use.
682-
secret:
699+
format: uri
700+
description: The URI that references the OAuth2 authority to use.
701+
grant:
683702
type: string
684-
description: The client secret to use, if any.
685-
required: [ id ]
686-
scopes:
687-
type: array
688-
items:
689-
type: string
690-
description: The scopes, if any, to request the token for.
691-
audiences:
692-
type: array
693-
items:
694-
type: string
695-
description: The audiences, if any, to request the token for.
696-
username:
697-
type: string
698-
description: The username to use. Used only if the grant type is Password.
699-
password:
700-
type: string
701-
description: The password to use. Used only if the grant type is Password.
702-
subject:
703-
$ref: '#/$defs/oauth2Token'
704-
description: The security token that represents the identity of the party on behalf of whom the request is being made.
705-
actor:
706-
$ref: '#/$defs/oauth2Token'
707-
description: The security token that represents the identity of the acting party.
708-
required: [ authority, grant, client ]
703+
description: The grant type to use.
704+
client:
705+
type: object
706+
properties:
707+
id:
708+
type: string
709+
description: The client id to use.
710+
secret:
711+
type: string
712+
description: The client secret to use, if any.
713+
required: [ id ]
714+
scopes:
715+
type: array
716+
items:
717+
type: string
718+
description: The scopes, if any, to request the token for.
719+
audiences:
720+
type: array
721+
items:
722+
type: string
723+
description: The audiences, if any, to request the token for.
724+
username:
725+
type: string
726+
description: The username to use. Used only if the grant type is Password.
727+
password:
728+
type: string
729+
description: The password to use. Used only if the grant type is Password.
730+
subject:
731+
$ref: '#/$defs/oauth2Token'
732+
description: The security token that represents the identity of the party on behalf of whom the request is being made.
733+
actor:
734+
$ref: '#/$defs/oauth2Token'
735+
description: The security token that represents the identity of the acting party.
736+
required: [ authority, grant, client ]
737+
- $ref: '#/$defs/secretBasedAuthenticationPolicy'
709738
required: [ oauth2 ]
710739
description: Use OAUTH2 authentication.
711740
description: Defines an authentication policy.
@@ -768,10 +797,8 @@ $defs:
768797
format: uri-template
769798
description: The endpoint's URI.
770799
authentication:
800+
$ref: '#/$defs/referenceableAuthenticationPolicy'
771801
description: The authentication policy to use.
772-
oneOf:
773-
- $ref: '#/$defs/authenticationPolicy'
774-
- type: string
775802
required: [ uri ]
776803
eventConsumptionStrategy:
777804
type: object
@@ -871,10 +898,8 @@ $defs:
871898
format: uri
872899
description: The endpoint's URI.
873900
authentication:
901+
$ref: '#/$defs/referenceableAuthenticationPolicy'
874902
description: The authentication policy to use.
875-
oneOf:
876-
- $ref: '#/$defs/authenticationPolicy'
877-
- type: string
878903
name:
879904
type: string
880905
description: The external resource's name, if any.
@@ -886,7 +911,9 @@ $defs:
886911
$ref: '#/$defs/schema'
887912
description: The schema used to describe and validate the input of the workflow or task.
888913
from:
889-
type: string
914+
oneOf:
915+
- type: string
916+
- type: object
890917
description: A runtime expression, if any, used to mutate and/or filter the input of the workflow or task.
891918
description: Configures the input of a workflow or task.
892919
output:
@@ -896,7 +923,9 @@ $defs:
896923
$ref: '#/$defs/schema'
897924
description: The schema used to describe and validate the output of the workflow or task.
898925
as:
899-
type: string
926+
oneOf:
927+
- type: string
928+
- type: object
900929
description: A runtime expression, if any, used to mutate and/or filter the output of the workflow or task.
901930
description: Configures the output of a workflow or task.
902931
export:
@@ -906,7 +935,9 @@ $defs:
906935
$ref: '#/$defs/schema'
907936
description: The schema used to describe and validate the workflow context.
908937
as:
909-
type: string
938+
oneOf:
939+
- type: string
940+
- type: object
910941
description: A runtime expression, if any, used to export the output data to the context.
911942
description: Set the content of the context.
912943
retryPolicy:

0 commit comments

Comments
 (0)