Skip to content

Commit 8f47368

Browse files
authored
Merge pull request #780 from handrews/canon
Split $anchor out of $id, define canonical vs shadowed URI behavior
2 parents d9e5b38 + 4c0d67a commit 8f47368

15 files changed

+360
-148
lines changed

hyper-schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
2+
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
33
"$id": "https://json-schema.org/draft/2019-08/hyper-schema",
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-08/vocab/core": true,

jsonschema-core.xml

Lines changed: 332 additions & 126 deletions
Large diffs are not rendered by default.

jsonschema-hyperschema.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ Link: <https://schema.example.com/entry>; rel="describedBy"
16181618
<![CDATA[
16191619
{
16201620
"$id": "https://schema.example.com/entry",
1621-
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
1621+
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
16221622
"base": "https://example.com/api/",
16231623
"links": [
16241624
{
@@ -1692,7 +1692,7 @@ Link: <https://schema.example.com/entry>; rel="describedBy"
16921692
<artwork>
16931693
<![CDATA[{
16941694
"$id": "https://schema.example.com/thing",
1695-
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
1695+
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
16961696
"base": "https://example.com/api/",
16971697
"type": "object",
16981698
"required": ["data"],
@@ -1808,7 +1808,7 @@ Link: <https://schema.example.com/entry>; rel="describedBy"
18081808
<artwork>
18091809
<![CDATA[{
18101810
"$id": "https://schema.example.com/interesting-stuff",
1811-
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
1811+
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
18121812
"required": ["stuffWorthEmailingAbout", "email", "title"],
18131813
"properties": {
18141814
"title": {
@@ -1995,7 +1995,7 @@ Link: <https://example.com/api/trees/1/nodes/456>; rev="up"
19951995
<artwork>
19961996
<![CDATA[{
19971997
"$id": "https://schema.example.com/tree-node",
1998-
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
1998+
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
19991999
"base": "trees/{treeId}/",
20002000
"properties": {
20012001
"id": {"type": "integer"},
@@ -2057,7 +2057,7 @@ Link: <https://example.com/api/trees/1/nodes/456>; rev="up"
20572057
<artwork>
20582058
<![CDATA[{
20592059
"$id": "https://schema.example.com/thing",
2060-
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
2060+
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
20612061
"base": "https://example.com/api/",
20622062
"type": "object",
20632063
"required": ["data"],
@@ -2110,7 +2110,7 @@ Link: <https://example.com/api/trees/1/nodes/456>; rev="up"
21102110
<artwork>
21112111
<![CDATA[{
21122112
"$id": "https://schema.example.com/thing-collection",
2113-
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
2113+
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
21142114
"base": "https://example.com/api/",
21152115
"type": "object",
21162116
"required": ["elements"],

jsonschema-validation.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@
177177

178178
<section title="Meta-Schema" anchor="meta-schema">
179179
<t>
180-
The current URI for the JSON Schema Validation meta-schema is
181-
<eref target="http://json-schema.org/draft/2019-08/schema#"/>.
180+
The current URI for the default JSON Schema meta-schema is
181+
<eref target="http://json-schema.org/draft/2019-08/schema"/>.
182182
For schema author convenience, this meta-schema describes all vocabularies
183183
defined in this specification and the JSON Schema Core specification,
184184
as well as two former keywords which are reserved for a transitional period.

links.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
2+
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
33
"$id": "https://json-schema.org/draft/2019-08/links",
44
"title": "Link Description Object",
55
"allOf": [

meta/applicator.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft/2019-08/schema#",
2+
"$schema": "https://json-schema.org/draft/2019-08/schema",
33
"$id": "https://json-schema.org/draft/2019-08/meta/applicator",
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-08/vocab/applicator": true

meta/content.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft/2019-08/schema#",
2+
"$schema": "https://json-schema.org/draft/2019-08/schema",
33
"$id": "https://json-schema.org/draft/2019-08/meta/content",
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-08/vocab/content": true

meta/core.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft/2019-08/schema#",
2+
"$schema": "https://json-schema.org/draft/2019-08/schema",
33
"$id": "https://json-schema.org/draft/2019-08/meta/core",
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-08/vocab/core": true
@@ -11,12 +11,18 @@
1111
"properties": {
1212
"$id": {
1313
"type": "string",
14-
"format": "uri-reference"
14+
"format": "uri-reference",
15+
"$comment": "Non-empty fragments not allowed.",
16+
"pattern": "^[^#]#?$"
1517
},
1618
"$schema": {
1719
"type": "string",
1820
"format": "uri"
1921
},
22+
"$anchor": {
23+
"type": "string",
24+
"pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$"
25+
},
2026
"$ref": {
2127
"type": "string",
2228
"format": "uri-reference"

meta/format.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft/2019-08/schema#",
2+
"$schema": "https://json-schema.org/draft/2019-08/schema",
33
"$id": "https://json-schema.org/draft/2019-08/meta/format",
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-08/vocab/format": true

meta/hyper-schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
2+
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
33
"$id": "https://json-schema.org/draft/2019-08/meta/hyper-schema",
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-08/vocab/hyper-schema": true

meta/meta-data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft/2019-08/schema#",
2+
"$schema": "https://json-schema.org/draft/2019-08/schema",
33
"$id": "https://json-schema.org/draft/2019-08/meta/meta-data",
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-08/vocab/meta-data": true

meta/validation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft/2019-08/schema#",
2+
"$schema": "https://json-schema.org/draft/2019-08/schema",
33
"$id": "https://json-schema.org/draft/2019-08/meta/validation",
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-08/vocab/validation": true

output/hyper-schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft/2019-08/schema#",
2+
"$schema": "https://json-schema.org/draft/2019-08/schema",
33
"$id": "https://json-schema.org/draft/2019-08/output/hyper-schema",
44
"title": "JSON Hyper-Schema Output",
55
"type": "array",

output/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft/2019-08/schema#",
2+
"$schema": "https://json-schema.org/draft/2019-08/schema",
33
"$id": "https://json-schema.org/draft/2019-08/output/schema",
44
"description": "A schema that validates the minimum requirements for validation output",
55

schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"$schema": "https://json-schema.org/draft/2019-08/schema#",
3-
"$id": "https://json-schema.org/draft/2019-08/schema#",
2+
"$schema": "https://json-schema.org/draft/2019-08/schema",
3+
"$id": "https://json-schema.org/draft/2019-08/schema",
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-08/vocab/core": true,
66
"https://json-schema.org/draft/2019-08/vocab/applicator": true,

0 commit comments

Comments
 (0)