Skip to content

Commit 6df593d

Browse files
committed
Fixed the schema to allow ISO 8601 duration expressions
Signed-off-by: Charles d'Avernas <[email protected]>
1 parent e9a4d61 commit 6df593d

File tree

1 file changed

+31
-26
lines changed

1 file changed

+31
-26
lines changed

schema/workflow.yaml

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,32 +1031,37 @@ $defs:
10311031
description: The type of the security token to use.
10321032
required: [ token, type ]
10331033
duration:
1034-
type: object
1035-
title: Duration
1036-
description: The definition of a duration.
1037-
minProperties: 1
1038-
unevaluatedProperties: false
1039-
properties:
1040-
days:
1041-
type: integer
1042-
title: DurationDays
1043-
description: Number of days, if any.
1044-
hours:
1045-
type: integer
1046-
title: DurationHours
1047-
description: Number of days, if any.
1048-
minutes:
1049-
type: integer
1050-
title: DurationMinutes
1051-
description: Number of minutes, if any.
1052-
seconds:
1053-
type: integer
1054-
title: DurationSeconds
1055-
description: Number of seconds, if any.
1056-
milliseconds:
1057-
type: integer
1058-
title: DurationMilliseconds
1059-
description: Number of milliseconds, if any.
1034+
oneOf:
1035+
- type: object
1036+
minProperties: 1
1037+
unevaluatedProperties: false
1038+
properties:
1039+
days:
1040+
type: integer
1041+
title: DurationDays
1042+
description: Number of days, if any.
1043+
hours:
1044+
type: integer
1045+
title: DurationHours
1046+
description: Number of days, if any.
1047+
minutes:
1048+
type: integer
1049+
title: DurationMinutes
1050+
description: Number of minutes, if any.
1051+
seconds:
1052+
type: integer
1053+
title: DurationSeconds
1054+
description: Number of seconds, if any.
1055+
milliseconds:
1056+
type: integer
1057+
title: DurationMilliseconds
1058+
description: Number of milliseconds, if any.
1059+
title: DurationInline
1060+
description: The inline definition of a duration.
1061+
- type: string
1062+
pattern: '^P(?!$)(\d+(?:\.\d+)?Y)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?W)?(\d+(?:\.\d+)?D)?(T(?=\d)(\d+(?:\.\d+)?H)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?S)?)?$'
1063+
title: DurationExpression
1064+
description: The ISO 8601 expression of a duration.
10601065
error:
10611066
type: object
10621067
title: Error

0 commit comments

Comments
 (0)