Skip to content

Commit 651599f

Browse files
authored
Merge pull request #1654 from json-schema-org/gregsdennis/consistency-scan
Gregsdennis/consistency scan
2 parents 3aa01d5 + 72fbb54 commit 651599f

2 files changed

Lines changed: 46 additions & 47 deletions

File tree

specs/jsonschema-core.md

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,8 @@ define their own dialects of JSON Schema.
105105

106106
### JSON Document
107107

108-
In JSON Schema, the terms "JSON document", "JSON data", and "JSON value" are
109-
interchangeable and refer to the data model defined in {{data-model}}.
110-
111-
In JSON Schema, the terms "JSON document", "JSON text", and "JSON value" are
112-
interchangeable because of the data model it defines in {{data-model}}.
108+
In JSON Schema, the terms "JSON document", "JSON data", "JSON text", and "JSON
109+
value" are interchangeable and refer to the data model defined in {{data-model}}.
113110

114111
JSON Schema is only defined over JSON documents. However, any document or memory
115112
structure that can be parsed into or processed according to the JSON Schema data
@@ -366,11 +363,11 @@ agreement, schema authors SHALL NOT expect these additional keywords to be
366363
supported by implementations that do not explicitly document such support.
367364

368365
Extension keywords MUST NOT directly modify the operation of keywords defined by
369-
this document or the companion JSON Schema Validation specificiation, and SHOULD
366+
this document or the companion JSON Schema Validation specification, and SHOULD
370367
NOT directly modify the operation of keywords defined by other extension
371-
documents.[^11]
368+
documents.[^1]
372369

373-
[^11]: JSON Schema currently does not have a namespacing mechanism, which would
370+
[^1]: JSON Schema currently does not have a namespacing mechanism, which would
374371
allow multiple extensions to define the same keyword differently while also
375372
giving the schema author the ability to declare which definition is intended.
376373
Such a feature is planned for future releases. See the
@@ -401,7 +398,9 @@ they do not know how to process or explicitly choose not to process.
401398
## Specification Versioning and Compatibility
402399

403400
This specification is identified collectively by two values: version, denoted as
404-
the letter "v" and the version number, and release year. For example,
401+
the letter "v", the version number, and the release year. For example, "v1/2026"
402+
denotes version 1, released in 2026; "v2/2042" would denote version 2, released
403+
in 2042.
405404

406405
A schema written to conform with the requirements of a given version is
407406
compatible with successive specifications, which are published with the same
@@ -410,15 +409,15 @@ provides a guarantee of compatibility for future releases within a version.
410409

411410
### Future Development and Support of Proposals
412411

413-
Continued development of these specifications and support requirments for
412+
Continued development of these specifications and support requirements for
414413
proposed features is managed in the
415414
[json-schema-org/json-schema-spec](https://github.com/json-schema-org/json-schema-spec)
416415
GitHub repository and defined by _PROCESS.md_.
417416

418417
## Keyword Behaviors {#keyword-behaviors}
419418

420419
JSON Schema keywords may exhibit one or more behaviors. This specification
421-
defines three such behaviors[^7]:
420+
defines three such behaviors[^2]:
422421

423422
- Assertions validate that an instance satisfies constraints, producing a
424423
boolean result: `true` if the constraints are satisfied; `false` otherwise.
@@ -427,7 +426,7 @@ defines three such behaviors[^7]:
427426
- Applicators apply subschemas to parts of the instance and combine their
428427
results.
429428

430-
[^7]: This specification also defines several operational directive keywords,
429+
[^2]: This specification also defines several operational directive keywords,
431430
such as `$id` and `$schema`, which do not exhibit these behaviors. Instead,
432431
these keywords provide metadata that instruct implementations on how to
433432
interpret and process the schema.
@@ -607,9 +606,9 @@ modified (e.g. the `not` keyword negates its subschema's assertion) and/or
607606
combined (e.g. `allOf` takes the conjunction of its subschemas' assertions) to
608607
produce the boolean result of the applicator. Applicators may apply any boolean
609608
logic operation to the assertion results of subschemas, but SHOULD NOT introduce
610-
new assertion conditions of their own.[^2]
609+
new assertion conditions of their own.[^3]
611610

612-
[^2]: It is recommended that keywords have a single resposibility. An example of
611+
[^3]: It is recommended that keywords have a single responsibility. An example of
613612
this in action is the separation between `properties`, which verifies object
614613
property values have the right data _if_ they exist, and `required`, which
615614
verifies that object properties exist. Separating these concerns allows for more
@@ -857,7 +856,7 @@ Keywords MAY be defined to use JSON Pointers or Relative JSON Pointers to
857856
examine parts of an instance outside the current evaluation location.
858857

859858
Keywords that allow adjusting the location using a Relative JSON Pointer SHOULD
860-
default to using the current location if a default is desireable.
859+
default to using the current location if a default is desirable.
861860

862861
## The JSON Schema Core Keywords {#core}
863862

@@ -911,7 +910,7 @@ steps.
911910
the specification that applies to that document.
912911
- If the media type of the schema is known and the media type defines a
913912
default dialect or a way to declare a dialect, the dialect MUST be
914-
determined by the rules of that media types. For example, the
913+
determined by the rules of that media type. For example, the
915914
[application/schema+json] media type includes a `schema` parameter that
916915
can be used to declare the dialect. A media type will generally only be
917916
available if the schema has been retrieved from an external source and
@@ -952,14 +951,14 @@ identified by
952951
(without fragments). These identifiers are used to create references between
953952
schema resources. When comparing IRIs for the purposes of resource
954953
identification, implementations MUST apply the Syntax-Based IRI normalization
955-
procedures defined in [RFC 3987][rfc3987], section 5.3.2.[^12] Implementations
956-
MAY also apply Scheme-Based and Protocol-Based Normalization.[^13]
954+
procedures defined in [RFC 3987][rfc3987], section 5.3.2.[^4] Implementations
955+
MAY also apply Scheme-Based and Protocol-Based Normalization.[^5]
957956

958-
[^12]: [RFC 3987][rfc3987], section 5.1, requires that applications using IRIs
957+
[^4]: [RFC 3987][rfc3987], section 5.1, requires that applications using IRIs
959958
as non-locating, identifier-only tokens MUST use Simple String Comparison. JSON
960959
Schema deviates from that requirement by specifying normalization requirements.
961960

962-
[^13]: We expect implementations to use whatever IRI libraries they have
961+
[^5]: We expect implementations to use whatever IRI libraries they have
963962
available to them and therefore don't always have control over which
964963
normalization rules are applied. Supporting Scheme-Based and Protocol-Based
965964
Normalization is allowed to accommodate those situations, but it is discouraged
@@ -1015,9 +1014,9 @@ The `$anchor` and `$dynamicAnchor` keywords are used to define
10151014
location-independent identifiers for subschemas within a schema resource.
10161015

10171016
`$anchor` defines a plain name fragment identifier that can be used in IRI
1018-
fragments as an alternative to JSON Pointers.[^4] See {{fragments}}.
1017+
fragments as an alternative to JSON Pointers.[^6] See {{fragments}}.
10191018

1020-
[^4]: Note that the anchor string does not include the "#" character, as it is
1019+
[^6]: Note that the anchor string does not include the "#" character, as it is
10211020
just a fragment identifier not an IRI reference. To reference the "foo"
10221021
`$anchor` from the same schema resource, you would use the fragment-only IRI
10231022
`#foo`. See below for full examples.
@@ -1071,9 +1070,9 @@ applicators, applying the referenced schema to the instance.
10711070
##### Direct References with `$ref` {#ref}
10721071

10731072
The `$ref` keyword is an applicator that is used to reference a statically
1074-
identified schema. Its results are the results of the referenced schema.[^5]
1073+
identified schema. Its results are the results of the referenced schema.[^7]
10751074

1076-
[^5]: Note that this definition of how the results are determined means that
1075+
[^7]: Note that this definition of how the results are determined means that
10771076
other keywords can appear alongside of `$ref` in the same schema object.
10781077

10791078
The value of the `$ref` keyword MUST be a string which is an IRI reference.
@@ -1095,9 +1094,9 @@ be extended or a generic schema such as a list whose items are defined by the
10951094
referencing schema.
10961095

10971096
The value of the `$dynamicRef` property MUST be formatted as a valid
1098-
[fragment-only IRI](#fragments).[^3]
1097+
[fragment-only IRI](#fragments).[^8]
10991098

1100-
[^3]: `$dynamicAnchor` defines the anchor with plain text, e.g. `foo`. Although,
1099+
[^8]: `$dynamicAnchor` defines the anchor with plain text, e.g. `foo`. Although,
11011100
for historical reasons, the value of `$dynamicRef` still uses a fragment-only
11021101
IRI syntax, e.g. `#foo`.
11031102

@@ -1106,9 +1105,9 @@ in the [dynamic scope](#scopes) which defines a matching `$dynamicAnchor`. The
11061105
schema to apply is the subschema of this resource which contains the matching
11071106
`$dynamicAnchor`. If no matching `$dynamicAnchor` is found, see {{failed-refs}}.
11081107

1109-
For a full example using these keywords, see {{dynamic-example}}.[^6]
1108+
For a full example using these keywords, see {{dynamic-example}}.[^9]
11101109

1111-
[^6]: The differences in the hyper-schema meta-schemas from draft-07 and draft
1110+
[^9]: The differences in the hyper-schema meta-schemas from draft-07 and draft
11121111
2019-09 dramatically demonstrates the utility of these keywords.
11131112

11141113
#### Schema Re-Use With `$defs` {#defs}
@@ -1143,7 +1142,7 @@ maintainers of the schema.
11431142

11441143
The value of this keyword MUST be a string.
11451144

1146-
This keyword MUST not affect validation or be collected as an annotation.
1145+
This keyword MUST NOT affect validation or be collected as an annotation.
11471146

11481147
The value of this keyword MAY be used as directives for developer tooling such
11491148
as a directive for a linter to ignore a linting rule in a schema.
@@ -1340,9 +1339,9 @@ desired to identify the object containing the `$ref` in the second
13401339
Due to the potential break in functionality described above, the behavior for
13411340
using JSON Pointer fragments that point to or cross a resource boundary is
13421341
undefined. Schema authors SHOULD NOT rely on such IRIs, as using them may
1343-
reduce interoperability.[^8]
1342+
reduce interoperability.[^10]
13441343

1345-
[^8]: This is to avoid requiring implementations to keep track of a whole stack
1344+
[^10]: This is to avoid requiring implementations to keep track of a whole stack
13461345
of possible base IRIs and JSON Pointer fragment identifiers for each, given
13471346
that all but one will be fragile if the schema resources are reorganized. Some
13481347
have argued that this is easy so there is no point in forbidding it, while
@@ -1424,9 +1423,9 @@ as using different dialects, these documents SHOULD NOT be validated by applying
14241423
a meta-schema to the Compound Schema Document as an instance. It is RECOMMENDED
14251424
that an alternate validation process be provided in order to validate Schema
14261425
Documents. Each Schema Resource SHOULD be separately validated against its
1427-
associated meta-schema.[^9]
1426+
associated meta-schema.[^11]
14281427

1429-
[^9]: If you know a schema is what's being validated, you can identify if the
1428+
[^11]: If you know a schema is what's being validated, you can identify if the
14301429
schemas is a Compound Schema Document or not, by way of use of `$id`, which
14311430
identifies an embedded resource when used not at the document's root.
14321431

@@ -1461,9 +1460,9 @@ interoperable and should not be relied upon.
14611460
When a schema is resolved over HTTP or another protocol that declares the media
14621461
type of the response, implementations SHOULD refuse to evaluate schemas whose
14631462
declared media type is not a known and supported JSON Schema media type such as
1464-
[application/schema+json].[^10]
1463+
[application/schema+json].[^12]
14651464

1466-
[^10]: An implementation can certainly try to interpret it as a schema, but
1465+
[^12]: An implementation can certainly try to interpret it as a schema, but
14671466
there's no guarantee that it can be parsed and evaluated as a schema. Therefore,
14681467
interpreting it as such has security implications and may produce unpredictable
14691468
or malicious results.
@@ -1698,7 +1697,7 @@ length of the array. Only array positions present in both the keyword's value
16981697
and the instance value are affected by this keyword.
16991698

17001699
This keyword produces an annotation value which is the largest index to which
1701-
this keyword applied a subschema. The value MAY be a boolean true if a subschema
1700+
this keyword applied a subschema. The value MAY be a boolean `true` if a subschema
17021701
was applied to every index of the instance, such as is produced by the `items`
17031702
keyword.
17041703

@@ -1746,7 +1745,7 @@ The annotation result of this keyword is the set of instance property names
17461745
which are also present under this keyword.
17471746

17481747
The presence of this keyword affects the behaviors of
1749-
[`additionalProperties`(#additionalProperties) and [`unevaluatedProperties`](#unevaluatedproperties).
1748+
[`additionalProperties`](#additionalproperties) and [`unevaluatedProperties`](#unevaluatedproperties).
17501749

17511750
##### `patternProperties`
17521751

@@ -1766,7 +1765,7 @@ The annotation result of this keyword is the set of instance property names
17661765
matched by at least one property under this keyword.
17671766

17681767
The presence of this keyword affects the behaviors of
1769-
[`additionalProperties`(#additionalproperties) and
1768+
[`additionalProperties`](#additionalproperties) and
17701769
[`unevaluatedProperties`](#unevaluatedproperties).
17711770

17721771
##### `additionalProperties` {#additionalproperties}
@@ -2228,9 +2227,9 @@ Document location `/$defs/C`:
22282227

22292228
Note: The fragment part of the IRI does not make it canonical or non-canonical,
22302229
rather, the base IRI used (as part of the full IRI with any fragment) is what
2231-
determines the canonical nature of the resulting full IRI.[^18]
2230+
determines the canonical nature of the resulting full IRI.[^13]
22322231

2233-
[^18]: Multiple "canonical" IRIs? We Acknowledge this is potentially confusing,
2232+
[^13]: Multiple "canonical" IRIs? We Acknowledge this is potentially confusing,
22342233
and direct you to read the CREF located in {{embedded}} for further comments.
22352234

22362235
While the following IRIs do correctly indicate specific schemas, per the reasons
@@ -2447,7 +2446,7 @@ instance of a distinct class.
24472446
This style of usage requires the annotation to be in the same object as the
24482447
reference, which must be recognizable as a reference.
24492448

2450-
## %appendix% Change Log[^19]
2449+
## %appendix% Change Log[^14]
24512450

24522451
### draft-bhutton-json-schema-next
24532452
- Use IRIs instead of URIs, including allowing unicode in plain-name fragments
@@ -2629,7 +2628,7 @@ time this document was published.
26292628
| Greg Dennis | | <gregsdennis@yahoo.com> | <https://github.com/gregsdennis> |
26302629
| Jason Desrosiers | Hyperjump Software, Inc. | <jason@hyperjump.io> | <https://github.com/jdesrosiers> |
26312630

2632-
[^19]: This section to be removed before leaving Internet-Draft status.
2631+
[^14]: This section to be removed before leaving Internet-Draft status.
26332632

26342633
[rfc3986]: https://www.rfc-editor.org/info/rfc3986
26352634
[rfc3987]: https://www.rfc-editor.org/info/rfc3987

specs/jsonschema-validation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,9 @@ specific dates. See RFC 3339, section 5.7.
422422
Implementations MAY support additional attributes using the other format names
423423
defined anywhere in that RFC. Implementations SHOULD NOT define extension
424424
attributes with any name matching an RFC 3339, RFC 9557, or ISO 8601 format
425-
unless it validates according to the rules of that format.[^5]
425+
unless it validates according to the rules of that format.[^4]
426426

427-
[^5]: There is not currently consensus on the need for supporting all RFC 3339
427+
[^4]: There is not currently consensus on the need for supporting all RFC 3339
428428
formats, so this approach of reserving the namespace will encourage
429429
experimentation without committing to the entire set. Either the format
430430
implementation requirements will become more flexible in general, or these will
@@ -612,9 +612,9 @@ Note that evaluating the `contentSchema` subschema in-place (i.e. as part of its
612612
parent schema) will ensure that it is correctly processed. Independent use of
613613
the extracted subschema (as returned in an annotation) is only safe if the
614614
subschema is an embedded resource which defines both a `$schema` and an absolute
615-
IRI `$id`.[^7]
615+
IRI `$id`.[^5]
616616

617-
[^7] Processing a non-resource subschema in place will ensure that any
617+
[^5]: Processing a non-resource subschema in place will ensure that any
618618
references (e.g. `$ref`) are always resolved properly. This isn't a problem when
619619
the subschema is itself a resource. See
620620
https://github.com/json-schema-org/json-schema-spec/issues/1381 for several
@@ -853,7 +853,7 @@ to the document.
853853
document
854854
- Also allow RFC 4648 encodings in `contentEncoding`
855855
- Added `minContains` and `maxContains`
856-
- Update RFC reference for nhostname" and "idn-hostname"
856+
- Update RFC reference for "hostname" and "idn-hostname"
857857
- Add "uuid" and "duration" formats
858858
- *draft-handrews-json-schema-validation-01*
859859
- This draft is purely a clarification with no functional changes

0 commit comments

Comments
 (0)