Skip to content

Split $anchor out of $id, define canonical vs shadowed URI behavior #780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Sep 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hyper-schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
"$id": "https://json-schema.org/draft/2019-08/hyper-schema",
"$vocabulary": {
"https://json-schema.org/draft/2019-08/vocab/core": true,
Expand Down
458 changes: 332 additions & 126 deletions jsonschema-core.xml

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions jsonschema-hyperschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,7 @@ Link: <https://schema.example.com/entry>; rel="describedBy"
<![CDATA[
{
"$id": "https://schema.example.com/entry",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
"base": "https://example.com/api/",
"links": [
{
Expand Down Expand Up @@ -1692,7 +1692,7 @@ Link: <https://schema.example.com/entry>; rel="describedBy"
<artwork>
<![CDATA[{
"$id": "https://schema.example.com/thing",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
"base": "https://example.com/api/",
"type": "object",
"required": ["data"],
Expand Down Expand Up @@ -1808,7 +1808,7 @@ Link: <https://schema.example.com/entry>; rel="describedBy"
<artwork>
<![CDATA[{
"$id": "https://schema.example.com/interesting-stuff",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
"required": ["stuffWorthEmailingAbout", "email", "title"],
"properties": {
"title": {
Expand Down Expand Up @@ -1995,7 +1995,7 @@ Link: <https://example.com/api/trees/1/nodes/456>; rev="up"
<artwork>
<![CDATA[{
"$id": "https://schema.example.com/tree-node",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
"base": "trees/{treeId}/",
"properties": {
"id": {"type": "integer"},
Expand Down Expand Up @@ -2057,7 +2057,7 @@ Link: <https://example.com/api/trees/1/nodes/456>; rev="up"
<artwork>
<![CDATA[{
"$id": "https://schema.example.com/thing",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
"base": "https://example.com/api/",
"type": "object",
"required": ["data"],
Expand Down Expand Up @@ -2110,7 +2110,7 @@ Link: <https://example.com/api/trees/1/nodes/456>; rev="up"
<artwork>
<![CDATA[{
"$id": "https://schema.example.com/thing-collection",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
"base": "https://example.com/api/",
"type": "object",
"required": ["elements"],
Expand Down
4 changes: 2 additions & 2 deletions jsonschema-validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@

<section title="Meta-Schema" anchor="meta-schema">
<t>
The current URI for the JSON Schema Validation meta-schema is
<eref target="http://json-schema.org/draft/2019-08/schema#"/>.
The current URI for the default JSON Schema meta-schema is
<eref target="http://json-schema.org/draft/2019-08/schema"/>.
For schema author convenience, this meta-schema describes all vocabularies
defined in this specification and the JSON Schema Core specification,
as well as two former keywords which are reserved for a transitional period.
Expand Down
2 changes: 1 addition & 1 deletion links.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
"$id": "https://json-schema.org/draft/2019-08/links",
"title": "Link Description Object",
"allOf": [
Expand Down
2 changes: 1 addition & 1 deletion meta/applicator.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json-schema.org/draft/2019-08/schema#",
"$schema": "https://json-schema.org/draft/2019-08/schema",
"$id": "https://json-schema.org/draft/2019-08/meta/applicator",
"$vocabulary": {
"https://json-schema.org/draft/2019-08/vocab/applicator": true
Expand Down
2 changes: 1 addition & 1 deletion meta/content.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json-schema.org/draft/2019-08/schema#",
"$schema": "https://json-schema.org/draft/2019-08/schema",
"$id": "https://json-schema.org/draft/2019-08/meta/content",
"$vocabulary": {
"https://json-schema.org/draft/2019-08/vocab/content": true
Expand Down
10 changes: 8 additions & 2 deletions meta/core.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json-schema.org/draft/2019-08/schema#",
"$schema": "https://json-schema.org/draft/2019-08/schema",
"$id": "https://json-schema.org/draft/2019-08/meta/core",
"$vocabulary": {
"https://json-schema.org/draft/2019-08/vocab/core": true
Expand All @@ -11,12 +11,18 @@
"properties": {
"$id": {
"type": "string",
"format": "uri-reference"
"format": "uri-reference",
"$comment": "Non-empty fragments not allowed.",
"pattern": "^[^#]#?$"
},
"$schema": {
"type": "string",
"format": "uri"
},
"$anchor": {
"type": "string",
"pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$"
},
"$ref": {
"type": "string",
"format": "uri-reference"
Expand Down
2 changes: 1 addition & 1 deletion meta/format.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json-schema.org/draft/2019-08/schema#",
"$schema": "https://json-schema.org/draft/2019-08/schema",
"$id": "https://json-schema.org/draft/2019-08/meta/format",
"$vocabulary": {
"https://json-schema.org/draft/2019-08/vocab/format": true
Expand Down
2 changes: 1 addition & 1 deletion meta/hyper-schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema#",
"$schema": "https://json-schema.org/draft/2019-08/hyper-schema",
"$id": "https://json-schema.org/draft/2019-08/meta/hyper-schema",
"$vocabulary": {
"https://json-schema.org/draft/2019-08/vocab/hyper-schema": true
Expand Down
2 changes: 1 addition & 1 deletion meta/meta-data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json-schema.org/draft/2019-08/schema#",
"$schema": "https://json-schema.org/draft/2019-08/schema",
"$id": "https://json-schema.org/draft/2019-08/meta/meta-data",
"$vocabulary": {
"https://json-schema.org/draft/2019-08/vocab/meta-data": true
Expand Down
2 changes: 1 addition & 1 deletion meta/validation.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json-schema.org/draft/2019-08/schema#",
"$schema": "https://json-schema.org/draft/2019-08/schema",
"$id": "https://json-schema.org/draft/2019-08/meta/validation",
"$vocabulary": {
"https://json-schema.org/draft/2019-08/vocab/validation": true
Expand Down
2 changes: 1 addition & 1 deletion output/hyper-schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json-schema.org/draft/2019-08/schema#",
"$schema": "https://json-schema.org/draft/2019-08/schema",
"$id": "https://json-schema.org/draft/2019-08/output/hyper-schema",
"title": "JSON Hyper-Schema Output",
"type": "array",
Expand Down
2 changes: 1 addition & 1 deletion output/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json-schema.org/draft/2019-08/schema#",
"$schema": "https://json-schema.org/draft/2019-08/schema",
"$id": "https://json-schema.org/draft/2019-08/output/schema",
"description": "A schema that validates the minimum requirements for validation output",

Expand Down
4 changes: 2 additions & 2 deletions schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2019-08/schema#",
"$id": "https://json-schema.org/draft/2019-08/schema#",
"$schema": "https://json-schema.org/draft/2019-08/schema",
"$id": "https://json-schema.org/draft/2019-08/schema",
"$vocabulary": {
"https://json-schema.org/draft/2019-08/vocab/core": true,
"https://json-schema.org/draft/2019-08/vocab/applicator": true,
Expand Down