diff --git a/dsl-reference.md b/dsl-reference.md index c5f463f5..fe5c26e7 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -2297,7 +2297,7 @@ timeout: ### Duration -Defines a duration. +Defines a duration. Durations can be defined through properties, with an ISO 8601 string or with a runtime expression that is evaluated to an ISO 8601 string #### Properties diff --git a/schema/workflow.yaml b/schema/workflow.yaml index 1d3933bb..299c33fe 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -1215,10 +1215,13 @@ $defs: description: Number of milliseconds, if any. title: DurationInline description: The inline definition of a duration. + - $ref: '#/$defs/runtimeExpression' + title: DurationExpression + description: Runtime expression that generates an ISO 8601 - type: string 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)?)?$' - title: DurationExpression - description: The ISO 8601 expression of a duration. + title: DurationLiteral + description: The Literal ISO 8601 representation of a duration. error: type: object title: Error