Skip to content

Commit cabc421

Browse files
committed
Fix schema and add invalid examples
Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
1 parent c672086 commit cabc421

File tree

3 files changed

+36
-6
lines changed

3 files changed

+36
-6
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
document:
2+
dsl: '1.0.0-alpha1'
3+
namespace: test
4+
name: listen-to-any
5+
version: '0.1.0'
6+
do:
7+
- callDoctor:
8+
listen:
9+
to:
10+
any: []
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
document:
2+
dsl: '1.0.0-alpha1'
3+
namespace: test
4+
name: listen-to-any
5+
version: '0.1.0'
6+
do:
7+
do:
8+
- callDoctor:
9+
listen:
10+
to:
11+
any: []
12+
until:
13+
any: []
14+
until: ${ ($context.events | length) == 3 }

schema/workflow.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,9 +1319,12 @@ $defs:
13191319
- type: string
13201320
title: AnyEventUntilCondition
13211321
description: A runtime expression condition evaluated after consuming an event and which determines whether or not to continue listening.
1322-
- $ref: '#/$defs/eventConsumptionStrategy'
1323-
title: AnyEventUntilConsumed
1324-
description: The strategy that defines the event(s) to consume to stop listening.
1322+
- allOf:
1323+
- $ref: '#/$defs/eventConsumptionStrategy'
1324+
title: AnyEventUntilConsumed
1325+
description: The strategy that defines the event(s) to consume to stop listening.
1326+
- properties:
1327+
until: false
13251328
required: [ any ]
13261329
- properties:
13271330
any:
@@ -1336,9 +1339,12 @@ $defs:
13361339
- type: string
13371340
title: AnyEventUntilCondition
13381341
description: A runtime expression condition evaluated after consuming an event and which determines whether or not to continue listening.
1339-
- $ref: '#/$defs/eventConsumptionStrategy'
1340-
title: AnyEventUntilConsumed
1341-
description: The strategy that defines the event(s) to consume to stop listening.
1342+
- allOf:
1343+
- $ref: '#/$defs/eventConsumptionStrategy'
1344+
title: AnyEventUntilConsumed
1345+
description: The strategy that defines the event(s) to consume to stop listening.
1346+
- properties:
1347+
until: false
13421348
required: [ any, until ]
13431349
- title: OneEventConsumptionStrategy
13441350
properties:

0 commit comments

Comments
 (0)