Skip to content

Commit 6eff664

Browse files
authored
Merge pull request #555 from handrews/errata2
handrews-*-01 bugfix for core & validation
2 parents 4d4d0bd + f76226d commit 6eff664

File tree

2 files changed

+62
-43
lines changed

2 files changed

+62
-43
lines changed

jsonschema-core.xml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<?rfc rfcedstyle="yes"?>
2020
<?rfc comments="yes"?>
2121
<?rfc inline="yes" ?>
22-
<rfc category="info" docName="draft-handrews-json-schema-00" ipr="trust200902">
22+
<rfc category="info" docName="draft-handrews-json-schema-01" ipr="trust200902">
2323
<front>
2424
<title abbrev="JSON Schema">JSON Schema: A Media Type for Describing JSON Documents</title>
2525

@@ -185,12 +185,12 @@
185185
depending on the type:
186186

187187
<list style="hanging">
188-
<t hangText="null">A JSON "null" production</t>
189-
<t hangText="boolean">A "true" or "false" value, from the JSON "true" or "false" productions</t>
190-
<t hangText="object">An unordered set of properties mapping a string to an instance, from the JSON "object" production</t>
191-
<t hangText="array">An ordered list of instances, from the JSON "array" production</t>
192-
<t hangText="number">An arbitrary-precision, base-10 decimal number value, from the JSON "number" production</t>
193-
<t hangText="string">A string of Unicode code points, from the JSON "string" production</t>
188+
<t hangText="null:">A JSON "null" production</t>
189+
<t hangText="boolean:">A "true" or "false" value, from the JSON "true" or "false" productions</t>
190+
<t hangText="object:">An unordered set of properties mapping a string to an instance, from the JSON "object" production</t>
191+
<t hangText="array:">An ordered list of instances, from the JSON "array" production</t>
192+
<t hangText="number:">An arbitrary-precision, base-10 decimal number value, from the JSON "number" production</t>
193+
<t hangText="string:">A string of Unicode code points, from the JSON "string" production</t>
194194
</list>
195195
</t>
196196
<t>
@@ -284,10 +284,10 @@
284284
or schema keywords. Broadly speaking, keywords fall into one or both
285285
of two categories:
286286
<list style="hanging">
287-
<t hangText="assertions">
287+
<t hangText="assertions:">
288288
produce a boolean result when applied to an instance
289289
</t>
290-
<t hangText="annotations">
290+
<t hangText="annotations:">
291291
attach information to an instance for application use
292292
</t>
293293
</list>
@@ -303,10 +303,10 @@
303303
in terms of the validation vocabulary, boolean schemas are equivalent to
304304
the following behaviors:
305305
<list style="hanging">
306-
<t hangText="true">
306+
<t hangText="true:">
307307
Always passes validation, as if the empty schema {}
308308
</t>
309-
<t hangText="false">
309+
<t hangText="false:">
310310
Always fails validation, as if the schema { "not":{} }
311311
</t>
312312
</list>
@@ -1045,7 +1045,7 @@ User-Agent: product-name/5.4.1 so-cool-json-schema/1.0.2 curl/7.43.0
10451045
<t>
10461046
Required parameters:
10471047
<list style="hanging">
1048-
<t hangText="schema">
1048+
<t hangText="schema:">
10491049
A non-empty list of space-separated URIs, each identifying
10501050
a JSON Schema resource. The instance SHOULD successfully
10511051
validate against at least one of these schemas.
@@ -1110,7 +1110,7 @@ User-Agent: product-name/5.4.1 so-cool-json-schema/1.0.2 curl/7.43.0
11101110
</author>
11111111
<date year="2017" month="November"/>
11121112
</front>
1113-
<seriesInfo name="Internet-Draft" value="draft-handrews-json-schema-validation-00" />
1113+
<seriesInfo name="Internet-Draft" value="draft-handrews-json-schema-validation-01" />
11141114
</reference>
11151115
<reference anchor="json-hyper-schema">
11161116
<front>
@@ -1123,7 +1123,7 @@ User-Agent: product-name/5.4.1 so-cool-json-schema/1.0.2 curl/7.43.0
11231123
</author>
11241124
<date year="2017" month="November"/>
11251125
</front>
1126-
<seriesInfo name="Internet-Draft" value="draft-handrews-json-schema-hyperschema-00" />
1126+
<seriesInfo name="Internet-Draft" value="draft-handrews-json-schema-hyperschema-01" />
11271127
</reference>
11281128
</references>
11291129

@@ -1157,6 +1157,17 @@ User-Agent: product-name/5.4.1 so-cool-json-schema/1.0.2 curl/7.43.0
11571157
</t>
11581158
<t>
11591159
<list style="hanging">
1160+
<t hangText="draft-handrews-json-schema-01">
1161+
<list style="symbols">
1162+
<t>This draft is purely a clarification with no functional changes</t>
1163+
<t>Clarified $id by use cases</t>
1164+
<t>Exhaustive schema identification examples</t>
1165+
<t>Replaced "external referencing" with how and when an implementation might know of a schema from another doucment</t>
1166+
<t>Replaced "internal referencing" with how an implementation should recognized schema identifiers during parsing</t>
1167+
<t>Dereferencing the former "internal" or "external" references is always the same process</t>
1168+
<t>Minor formatting improvements</t>
1169+
</list>
1170+
</t>
11601171
<t hangText="draft-handrews-json-schema-00">
11611172
<list style="symbols">
11621173
<t>Make the concept of a schema keyword vocabulary more clear</t>

jsonschema-validation.xml

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<?rfc rfcedstyle="yes"?>
2727
<?rfc comments="yes"?>
2828
<?rfc inline="yes" ?>
29-
<rfc category="info" docName="draft-handrews-json-schema-validation-00" ipr="trust200902">
29+
<rfc category="info" docName="draft-handrews-json-schema-validation-01" ipr="trust200902">
3030
<front>
3131
<title abbrev="JSON Schema Validation">
3232
JSON Schema Validation: A Vocabulary for Structural Validation of JSON
@@ -686,14 +686,14 @@
686686
<section title="dependencies">
687687
<t>
688688
<cref>
689-
Now that "if", "then", and "else" are keywords, it is not clear whether
690-
there is any benefit in keeping the schema form of "dependencies".
691-
It is frequently misunderstood, and having a form that takes a subschema
692-
as well as a form that takes a primitive value is particularly
693-
confusing. And it seems to be rarely used. Depending on feedback
694-
with "if", "then", and "else", the schema form of this keyword may
695-
well be removed in a future draft. Current thought is that the string
696-
form (giving property names in an array) is a useful shortcut.
689+
This keyword may be split into two, with the variation that uses
690+
an array of property names rather than a subschema getting a new
691+
name. The dual behavior is confusing and relatively difficult to
692+
implement. In the previous draft, we proposed dropping the keyword
693+
altogether, or dropping one of its forms, but we received feedback
694+
in support of keeping it. See issues #442 and #528 at
695+
&lt;https://github.com/json-schema-org/json-schema-spec/issues&gt;
696+
for further discussion. Further feedback is encouraged.
697697
</cref>
698698
</t>
699699
<t>
@@ -926,15 +926,15 @@
926926
Implementations supporting formats SHOULD implement support for
927927
the following attributes:
928928
<list style="hanging">
929-
<t hangText="date-time">
929+
<t hangText="date-time:">
930930
A string instance is valid against this attribute if it is
931931
a valid representation according to the "date-time" production.
932932
</t>
933-
<t hangText="date">
933+
<t hangText="date:">
934934
A string instance is valid against this attribute if it is
935935
a valid representation according to the "full-date" production.
936936
</t>
937-
<t hangText="time">
937+
<t hangText="time:">
938938
A string instance is valid against this attribute if it is
939939
a valid representation according to the "full-time" production.
940940
</t>
@@ -967,10 +967,10 @@
967967
A string instance is valid against these attributes if it is a valid
968968
Internet email address as follows:
969969
<list style="hanging">
970-
<t hangText="email">
970+
<t hangText="email:">
971971
As defined by <xref target="RFC5322">RFC 5322, section 3.4.1</xref>.
972972
</t>
973-
<t hangText="idn-email">
973+
<t hangText="idn-email:">
974974
As defined by <xref target="RFC6531">RFC 6531</xref>
975975
</t>
976976
</list>
@@ -986,12 +986,12 @@
986986
A string instance is valid against these attributes if it is a valid
987987
representation for an Internet hostname as follows:
988988
<list style="hanging">
989-
<t hangText="hostname">
989+
<t hangText="hostname:">
990990
As defined by <xref target="RFC1034">RFC 1034, section 3.1</xref>,
991991
including host names produced using the Punycode algorithm
992992
specified in <xref target="RFC5891">RFC 5891, section 4.4</xref>.
993993
</t>
994-
<t hangText="idn-hostname">
994+
<t hangText="idn-hostname:">
995995
As defined by either RFC 1034 as for hostname, or an
996996
internationalized hostname as defined by
997997
<xref target="RFC5890">RFC 5890, section 2.3.2.3</xref>.
@@ -1010,12 +1010,12 @@
10101010
A string instance is valid against these attributes if it is a valid
10111011
representation of an IP address as follows:
10121012
<list style="hanging">
1013-
<t hangText="ipv4">
1013+
<t hangText="ipv4:">
10141014
An IPv4 address according to the "dotted-quad" ABNF
10151015
syntax as defined in
10161016
<xref target="RFC2673">RFC 2673, section 3.2</xref>.
10171017
</t>
1018-
<t hangText="ipv6">
1018+
<t hangText="ipv6:">
10191019
An IPv6 address as defined in
10201020
<xref target="RFC4291">RFC 4291, section 2.2</xref>.
10211021
</t>
@@ -1029,20 +1029,20 @@
10291029
</t>
10301030
<t>
10311031
<list style="hanging">
1032-
<t hangText="uri">
1032+
<t hangText="uri:">
10331033
A string instance is valid against this attribute if it is
10341034
a valid URI, according to <xref target="RFC3986"/>.
10351035
</t>
1036-
<t hangText="uri-reference">
1036+
<t hangText="uri-reference:">
10371037
A string instance is valid against this attribute if it is a valid URI
10381038
Reference (either a URI or a relative-reference),
10391039
according to <xref target="RFC3986"/>.
10401040
</t>
1041-
<t hangText="iri">
1041+
<t hangText="iri:">
10421042
A string instance is valid against this attribute if it is
10431043
a valid IRI, according to <xref target="RFC3987"/>.
10441044
</t>
1045-
<t hangText="iri-reference">
1045+
<t hangText="iri-reference:">
10461046
A string instance is valid against this attribute if it is a valid IRI
10471047
Reference (either an IRI or a relative-reference),
10481048
according to <xref target="RFC3987"/>.
@@ -1073,12 +1073,12 @@
10731073
</t>
10741074
<t>
10751075
<list style="hanging">
1076-
<t hangText="json-pointer">
1076+
<t hangText="json-pointer:">
10771077
A string instance is valid against this attribute if it
10781078
is a valid JSON string representation of a JSON Pointer,
10791079
according to <xref target="RFC6901">RFC 6901, section 5</xref>.
10801080
</t>
1081-
<t hangText="relative-json-pointer">
1081+
<t hangText="relative-json-pointer:">
10821082
A string instance is valid against this attribute if it is a valid
10831083
<xref target="relative-json-pointer">Relative JSON Pointer</xref>.
10841084
</t>
@@ -1261,8 +1261,8 @@
12611261
<t>
12621262
Schema validation is a useful mechanism for annotating instance data
12631263
with additional information. The rules for determining when and how
1264-
annotations are associated with an instance are outlined in this specification's
1265-
overview.
1264+
annotations are associated with an instance are outlined in section
1265+
<xref target="annotations" format="counter"></xref>.
12661266
</t>
12671267
<t>
12681268
These general-purpose annotation keywords provide commonly used information
@@ -1439,7 +1439,7 @@
14391439
</author>
14401440
<date year="2017" month="November"/>
14411441
</front>
1442-
<seriesInfo name="Internet-Draft" value="draft-handrews-relative-json-pointer-00" />
1442+
<seriesInfo name="Internet-Draft" value="draft-handrews-relative-json-pointer-01" />
14431443
</reference>
14441444
<reference anchor="json-schema">
14451445
<front>
@@ -1452,7 +1452,7 @@
14521452
</author>
14531453
<date year="2017" month="November"/>
14541454
</front>
1455-
<seriesInfo name="Internet-Draft" value="draft-handrews-json-schema-00" />
1455+
<seriesInfo name="Internet-Draft" value="draft-handrews-json-schema-01" />
14561456
</reference>
14571457
</references>
14581458

@@ -1491,6 +1491,14 @@
14911491
</t>
14921492
<t>
14931493
<list style="hanging">
1494+
<t hangText="draft-handrews-json-schema-validation-01">
1495+
<list style="symbols">
1496+
<t>This draft is purely a clarification with no functional changes</t>
1497+
<t>Restored ommitted "if present" clause for "else" under "if"</t>
1498+
<t>Clarified that when "if" is absent, the results of "then" and "else" are ignored</t>
1499+
<t>Minor formatting and cross-referencing improvements</t>
1500+
</list>
1501+
</t>
14941502
<t hangText="draft-handrews-json-schema-validation-00">
14951503
<list style="symbols">
14961504
<t>Added "if"/"then"/"else"</t>
@@ -1511,7 +1519,7 @@
15111519
</t>
15121520
<t hangText="draft-wright-json-schema-validation-01">
15131521
<list style="symbols">
1514-
<t>Standardized on hyphenated format names ("uriref" becomes "uri-ref")</t>
1522+
<t>Standardized on hyphenated format names with full words ("uriref" becomes "uri-reference")</t>
15151523
<t>Add the formats "uri-template" and "json-pointer"</t>
15161524
<t>Changed "exclusiveMaximum"/"exclusiveMinimum" from boolean modifiers of "maximum"/"minimum" to independent numeric fields.</t>
15171525
<t>Split the additionalItems/items into two sections</t>

0 commit comments

Comments
 (0)