Skip to content

Commit ac276ff

Browse files
brrusinoanandanthony
authored andcommitted
added duration format to support ISO8601 strings (Azure#21711)
1 parent c567363 commit ac276ff

File tree

1 file changed

+4
-2
lines changed
  • specification/chaos/resource-manager/Microsoft.Chaos/preview/2022-10-01-preview/types

1 file changed

+4
-2
lines changed

specification/chaos/resource-manager/Microsoft.Chaos/preview/2022-10-01-preview/types/experiments.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@
212212
"duration": {
213213
"type": "string",
214214
"description": "ISO8601 formatted string that represents a duration.",
215-
"pattern": "^P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\\.\\d+)?S)?)?$"
215+
"pattern": "^P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\\.\\d+)?S)?)?$",
216+
"format": "duration"
216217
}
217218
},
218219
"required": [
@@ -265,7 +266,8 @@
265266
"duration": {
266267
"type": "string",
267268
"description": "ISO8601 formatted string that represents a duration.",
268-
"pattern": "^P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\\.\\d+)?S)?)?$"
269+
"pattern": "^P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\\.\\d+)?S)?)?$",
270+
"format": "duration"
269271
},
270272
"parameters": {
271273
"description": "List of key value pairs.",

0 commit comments

Comments
 (0)