From 3551097fd9dc7adc99fb1f5c75cf2f2d0dff62db Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Fri, 8 Sep 2017 14:38:32 -0700 Subject: [PATCH 1/3] Support date and time, and allow for more RFC 3339 This addresses #199 by supporting the two least controversial and most requested addtional date/time formats, and reserving the remaining namespace while we decide whether or how to specify additional RFC 3339 formats. --- jsonschema-validation.xml | 46 ++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index 8c90bdb2..7414f796 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -799,14 +799,48 @@
-
- - This attribute applies to string instances. +
+ + These attributes apply to string instances. + + + Date and time format names are derived from + RFC 3339, section 5.6. + + + Implementations supporting formats SHOULD implement support for + the following attributes: + + + A string instance is valid against this attribute if it is + a valid representation according to the "date-time" production. + + + A string instance is valid against this attribute if it is + a valid representation according to the "full-date" production. + + + A string instance is valid against this attribute if it is + a valid representation according to the "full-time" production. + + - A string instance is valid against this attribute if it is a valid date - representation as defined by RFC 3339, section - 5.6. + Implementations MAY support additional attributes using the other + production names defined in that section. If implementing + "full-date" or "full-time", the corresponding short form ("date" + or "time" respectively) MUST be implemented, and MUST behave + identically. Implementations SHOULD NOT define extension attributes + with any name matching an RFC 3339 production unless it validates + according to the rules of that production. + + There is not currently consensus on the need for supporting + all RFC 3339 formats, so this approach of reserving the + namespace will encourage experimentation without committing + to the entire set. Either the format implementation requirements + will become more flexible in general, or these will likely + either be promoted to fully specified attributes or dropped. +
From 18b4384aa8b20de5a3c9701456024829d16d07c9 Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Sat, 9 Sep 2017 15:39:37 -0700 Subject: [PATCH 2/3] Clarify wording. --- jsonschema-validation.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index 7414f796..08d50661 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -827,10 +827,10 @@
Implementations MAY support additional attributes using the other - production names defined in that section. If implementing - "full-date" or "full-time", the corresponding short form ("date" - or "time" respectively) MUST be implemented, and MUST behave - identically. Implementations SHOULD NOT define extension attributes + production names defined in that section. If "full-date" or "full-time", + are implemented, the corresponding short form ("date" or "time" + respectively) MUST be implemented, and MUST behave identically. + Implementations SHOULD NOT define extension attributes with any name matching an RFC 3339 production unless it validates according to the rules of that production. From 544244ecbc45d84607de51a4727f97c3905a9870 Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Mon, 11 Sep 2017 09:56:32 -0700 Subject: [PATCH 3/3] Remove stray comma. --- jsonschema-validation.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index 08d50661..79c30f9b 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -827,7 +827,7 @@ Implementations MAY support additional attributes using the other - production names defined in that section. If "full-date" or "full-time", + production names defined in that section. If "full-date" or "full-time" are implemented, the corresponding short form ("date" or "time" respectively) MUST be implemented, and MUST behave identically. Implementations SHOULD NOT define extension attributes