Skip to content

Commit 298aa14

Browse files
authored
Merge pull request #1596 from json-schema-org/gregsdennis/spec-versioning
Gregsdennis/spec versioning
2 parents 3dff25d + 4a5da5f commit 298aa14

File tree

2 files changed

+36
-14
lines changed

2 files changed

+36
-14
lines changed

specs/jsonschema-core.md

+19-8
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,16 @@ keywords MUST NOT begin with this prefix.
427427
Implementations MUST refuse to evaluate schemas which contain keywords which
428428
they do not know how to process or explicitly choose not to process.
429429

430+
## Specification Versioning and Compatibility
431+
432+
This specification is identified collectively by two values: version and release
433+
year.
434+
435+
A schema written to conform with the requirements of a given version is
436+
compatible with successive specifications, which are published with the same
437+
version and either the same or greater release year value. Thus, JSON Schema
438+
provides a guarantee of compatibility for future releases within a version.
439+
430440
## Keyword Behaviors {#keyword-behaviors}
431441

432442
JSON Schema keywords may exhibit one or more behaviors. This specification
@@ -873,16 +883,17 @@ default to using the current location if a default is desireable.
873883

874884
## The JSON Schema Core Keywords {#core}
875885

876-
Keywords declared in this section, which all begin with "$", are essential to
877-
processing JSON Schema. These keywords inform implementations how to process any
878-
schema or meta-schema, including those split across multiple documents, or exist
879-
to reserve keywords for purposes that require guaranteed interoperability.
886+
Keywords declared in this section, which all begin with a dollar sign (`$`), are
887+
essential to processing JSON Schema. These keywords inform implementations how
888+
to process any schema or meta-schema, including those split across multiple
889+
documents, or exist to reserve keywords for purposes that require guaranteed
890+
interoperability.
880891

881892
Support for these keywords MUST be considered mandatory at all times as they are
882893
necessary to navigate and process any schema.
883894

884-
The "$" prefix is reserved for use by this specification. Extensions MUST NOT
885-
define new keywords that begin with "$".
895+
The `$` prefix is reserved for use by this specification. Extensions MUST NOT
896+
define new keywords that begin with `$`.
886897

887898
### Meta-Schemas
888899

@@ -2243,7 +2254,7 @@ and only allows the "data" and "children" properties. An example instance with
22432254

22442255
```jsonschema "Tree schema, extensible"
22452256
{
2246-
"$schema": "https://json-schema.org/draft/next/schema",
2257+
"$schema": "https://json-schema.org/1/2025",
22472258
"$id": "https://example.com/tree",
22482259
"$dynamicAnchor": "node",
22492260
@@ -2262,7 +2273,7 @@ and only allows the "data" and "children" properties. An example instance with
22622273

22632274
```jsonschema "Strict-tree schema, guards against misspelled properties"
22642275
{
2265-
"$schema": "https://json-schema.org/draft/next/schema",
2276+
"$schema": "https://json-schema.org/1/2025",
22662277
"$id": "https://example.com/strict-tree",
22672278
"$dynamicAnchor": "node",
22682279

specs/jsonschema-validation.md

+17-6
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,27 @@ specification.
103103
## Meta-Schema {#meta-schema}
104104

105105
The current IRI for the default JSON Schema dialect meta-schema is
106-
`https://json-schema.org/draft/next/schema`. For schema author convenience, this
107-
meta-schema describes a dialect consisting of all keywords defined in this
106+
`https://json-schema.org/1/2025`. This IRI encodes the specification's version
107+
and release year. Because all schemas written to conform to a given version are
108+
guaranteed to be compatible with later releases within the same version, the
109+
meta-schema IRI `https://json-schema.org/1` is also recognized to represent the
110+
latest release within the indicated version.
111+
112+
The meta-schema describes a dialect consisting of all keywords defined in this
108113
specification and the JSON Schema Core specification. Certain keywords specify
109114
some functionality which is optional to support and is explained in detail in
110115
the relevant sections.
111116

112-
Updated meta-schema IRIs MAY be published between specification drafts in order
113-
to correct errors. Implementations SHOULD consider IRIs dated after this
114-
specification draft and before the next to indicate the same syntax and
115-
semantics as those listed here.
117+
Where the meta-schema conflicts with either this specification or the JSON
118+
Schema Core specification, the specifications take precedence, and the
119+
meta-schema is to be considered in error. The meta-schema may be occasionally
120+
updated to correct any such errors.
121+
122+
Although the IRI for the default JSON Schema dialect meta-schema is also a valid
123+
URL, implementations MUST NOT assume that a document is provided at this
124+
location. Rather than performing a network request to retrieve the meta-schema,
125+
implementations SHOULD include a copy of the meta-schema and MAY encode it as
126+
required by the language or framework used by the implementation.
116127

117128
## Keywords for Structural Validation
118129

0 commit comments

Comments
 (0)