From 539187bfc983421e977e918f8640842616f206dc Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Tue, 28 Nov 2017 08:52:16 -0800 Subject: [PATCH 1/5] Add : to hanging list lables w short bodies The main HTML rendering of the spec on the IETF site (and the plain text rendering) put the first line of a hanging text body on the same line as the label. When the bodies are each a single line, this looks like a weird spacing error rather than a labeled list. Use colons to make these lists more listy. This is *not* done with the body is itself a list, as the plain text formatting handles that in a way that is already clear, and the colon looks odd particularly for the list where the labels are JSON Pointers. --- jsonschema-core.xml | 22 +++++++++++----------- jsonschema-validation.xml | 30 +++++++++++++++--------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index cc379a5d..8a0c31da 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -185,12 +185,12 @@ depending on the type: - A JSON "null" production - A "true" or "false" value, from the JSON "true" or "false" productions - An unordered set of properties mapping a string to an instance, from the JSON "object" production - An ordered list of instances, from the JSON "array" production - An arbitrary-precision, base-10 decimal number value, from the JSON "number" production - A string of Unicode code points, from the JSON "string" production + A JSON "null" production + A "true" or "false" value, from the JSON "true" or "false" productions + An unordered set of properties mapping a string to an instance, from the JSON "object" production + An ordered list of instances, from the JSON "array" production + An arbitrary-precision, base-10 decimal number value, from the JSON "number" production + A string of Unicode code points, from the JSON "string" production @@ -284,10 +284,10 @@ or schema keywords. Broadly speaking, keywords fall into one or both of two categories: - + produce a boolean result when applied to an instance - + attach information to an instance for application use @@ -303,10 +303,10 @@ in terms of the validation vocabulary, boolean schemas are equivalent to the following behaviors: - + Always passes validation, as if the empty schema {} - + Always fails validation, as if the schema { "not":{} } @@ -1045,7 +1045,7 @@ User-Agent: product-name/5.4.1 so-cool-json-schema/1.0.2 curl/7.43.0 Required parameters: - + A non-empty list of space-separated URIs, each identifying a JSON Schema resource. The instance SHOULD successfully validate against at least one of these schemas. diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index 46d4b24c..919945b1 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -912,15 +912,15 @@ 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. @@ -953,10 +953,10 @@ A string instance is valid against these attributes if it is a valid Internet email address as follows: - + As defined by RFC 5322, section 3.4.1. - + As defined by RFC 6531 @@ -972,12 +972,12 @@ A string instance is valid against these attributes if it is a valid representation for an Internet hostname as follows: - + As defined by RFC 1034, section 3.1, including host names produced using the Punycode algorithm specified in RFC 5891, section 4.4. - + As defined by either RFC 1034 as for hostname, or an internationalized hostname as defined by RFC 5890, section 2.3.2.3. @@ -996,12 +996,12 @@ A string instance is valid against these attributes if it is a valid representation of an IP address as follows: - + An IPv4 address according to the "dotted-quad" ABNF syntax as defined in RFC 2673, section 3.2. - + An IPv6 address as defined in RFC 4291, section 2.2. @@ -1015,20 +1015,20 @@ - + A string instance is valid against this attribute if it is a valid URI, according to . - + A string instance is valid against this attribute if it is a valid URI Reference (either a URI or a relative-reference), according to . - + A string instance is valid against this attribute if it is a valid IRI, according to . - + A string instance is valid against this attribute if it is a valid IRI Reference (either an IRI or a relative-reference), according to . @@ -1059,12 +1059,12 @@ - + A string instance is valid against this attribute if it is a valid JSON string representation of a JSON Pointer, according to RFC 6901, section 5. - + A string instance is valid against this attribute if it is a valid Relative JSON Pointer. From 066204c6240966369d0b26de39df95ba34002c3f Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Fri, 2 Mar 2018 22:34:40 -0800 Subject: [PATCH 2/5] Update "dependencies" CREF We're no longer likely to drop it, but we are likely to split it. This was successful in provoking feedback before so let's keep it up to date. --- jsonschema-validation.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index 919945b1..ae35d338 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -686,14 +686,14 @@
- Now that "if", "then", and "else" are keywords, it is not clear whether - there is any benefit in keeping the schema form of "dependencies". - It is frequently misunderstood, and having a form that takes a subschema - as well as a form that takes a primitive value is particularly - confusing. And it seems to be rarely used. Depending on feedback - with "if", "then", and "else", the schema form of this keyword may - well be removed in a future draft. Current thought is that the string - form (giving property names in an array) is a useful shortcut. + This keyword may be split into two, with the variation that uses + an array of property names rather than a subschema getting a new + name. The dual behavior is confusing and relatively difficult to + implement. In the previous draft, we proposed dropping the keyword + altogether, or dropping one of its forms, but we received feedback + in support of keeping it. See issues #442 and #528 at + <https://github.com/json-schema-org/json-schema-spec/issues> + for further discussion. Further feedback is encouraged. From 53b28fc2883dddee5dcc4d5409e3ad27772d322d Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Fri, 2 Mar 2018 19:33:56 -0800 Subject: [PATCH 3/5] handrews-*-01 for core and validation, add commit log This is a purely bugfix / wording change, with no funcitonal changes or meta-schema changes. --- jsonschema-core.xml | 17 ++++++++++++++--- jsonschema-validation.xml | 14 +++++++++++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 8a0c31da..789700a0 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -19,7 +19,7 @@ - + JSON Schema: A Media Type for Describing JSON Documents @@ -1110,7 +1110,7 @@ User-Agent: product-name/5.4.1 so-cool-json-schema/1.0.2 curl/7.43.0 - + @@ -1123,7 +1123,7 @@ User-Agent: product-name/5.4.1 so-cool-json-schema/1.0.2 curl/7.43.0 - + @@ -1157,6 +1157,17 @@ User-Agent: product-name/5.4.1 so-cool-json-schema/1.0.2 curl/7.43.0 + + + This draft is purely a clarification with no functional changes + Clarified $id by use cases + Exhaustive schema identification examples + Replaced "external referencing" with how and when an implementation might know of a schema from another doucment + Replaced "internal referencing" with how an implementation should recognized schema identifiers during parsing + Dereferencing the former "internal" or "external" references is always the same process + Minor formatting improvements + + Make the concept of a schema keyword vocabulary more clear diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index ae35d338..eafadb5a 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -26,7 +26,7 @@ - + JSON Schema Validation: A Vocabulary for Structural Validation of JSON @@ -1425,7 +1425,7 @@ </author> <date year="2017" month="November"/> </front> - <seriesInfo name="Internet-Draft" value="draft-handrews-relative-json-pointer-00" /> + <seriesInfo name="Internet-Draft" value="draft-handrews-relative-json-pointer-01" /> </reference> <reference anchor="json-schema"> <front> @@ -1438,7 +1438,7 @@ </author> <date year="2017" month="November"/> </front> - <seriesInfo name="Internet-Draft" value="draft-handrews-json-schema-00" /> + <seriesInfo name="Internet-Draft" value="draft-handrews-json-schema-01" /> </reference> </references> @@ -1477,6 +1477,14 @@ </t> <t> <list style="hanging"> + <t hangText="draft-handrews-json-schema-validation-01"> + <list style="symbols"> + <t>This draft is purely a clarification with no functional changes</t> + <t>Restored ommitted "if present" clause for "else" under "if"</t> + <t>Clarified that when "if" is absent, the results of "then" and "else" are ignored</t> + <t>Minor formatting improvements</t> + </list> + </t> <t hangText="draft-handrews-json-schema-validation-00"> <list style="symbols"> <t>Added "if"/"then"/"else"</t> From db6795287fad368c0c7099bab858ee52d2fe0be5 Mon Sep 17 00:00:00 2001 From: Henry Andrews <henry@cloudflare.com> Date: Sat, 3 Mar 2018 18:05:06 -0800 Subject: [PATCH 4/5] Fix error in older changelog While we were at one point going to use "uri-ref", by the time we actually published draft-wright-json-schema-validation-01 we had decided on "uri-reference". --- jsonschema-validation.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index eafadb5a..24f9349d 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -1505,7 +1505,7 @@ </t> <t hangText="draft-wright-json-schema-validation-01"> <list style="symbols"> - <t>Standardized on hyphenated format names ("uriref" becomes "uri-ref")</t> + <t>Standardized on hyphenated format names with full words ("uriref" becomes "uri-reference")</t> <t>Add the formats "uri-template" and "json-pointer"</t> <t>Changed "exclusiveMaximum"/"exclusiveMinimum" from boolean modifiers of "maximum"/"minimum" to independent numeric fields.</t> <t>Split the additionalItems/items into two sections</t> From f76226d3ffa04701e9f21243263a45508801af15 Mon Sep 17 00:00:00 2001 From: Henry Andrews <henry@cloudflare.com> Date: Sat, 3 Mar 2018 18:08:59 -0800 Subject: [PATCH 5/5] Crosslink annotations to implementation guidance. --- jsonschema-validation.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index 24f9349d..91287b06 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -1247,8 +1247,8 @@ <t> Schema validation is a useful mechanism for annotating instance data with additional information. The rules for determining when and how - annotations are associated with an instance are outlined in this specification's - overview. + annotations are associated with an instance are outlined in section + <xref target="annotations" format="counter"></xref>. </t> <t> These general-purpose annotation keywords provide commonly used information @@ -1482,7 +1482,7 @@ <t>This draft is purely a clarification with no functional changes</t> <t>Restored ommitted "if present" clause for "else" under "if"</t> <t>Clarified that when "if" is absent, the results of "then" and "else" are ignored</t> - <t>Minor formatting improvements</t> + <t>Minor formatting and cross-referencing improvements</t> </list> </t> <t hangText="draft-handrews-json-schema-validation-00">