From 46a1a46decf2a3510ddd403280f5bcf40c4d2f65 Mon Sep 17 00:00:00 2001 From: Emmanuel Mathot Date: Wed, 11 Dec 2024 16:27:19 +0100 Subject: [PATCH] feat: Update date-time string pattern in JSON schema for improved validation --- json-schema/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-schema/schema.json b/json-schema/schema.json index b4d0f83..de172fd 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -143,7 +143,7 @@ "type": "object", "$comment": "The key is a date-time string, and the value is an array of numbers.", "patternProperties": { - "^([\\+-]?\\d{4}(?!\\d{2}\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$": { + "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))$": { "type": "array", "items": { "type": "number"