Skip to content

Fix missed "$id" that should be "$anchor", and other minor fixes #991

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 3 commits into from
Sep 25, 2020
Merged
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
52 changes: 26 additions & 26 deletions jsonschema-core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@
<t>
Object properties that are applied to the instance are called keywords,
or schema keywords. Broadly speaking, keywords fall into one
of four categories:
of five categories:
<list style="hanging">
<t hangText="identifiers:">
control schema identification through setting the schema's
Expand Down Expand Up @@ -1692,26 +1692,26 @@
<artwork>
<![CDATA[
{
"$id": "https://example.net/root.json",
"items": {
"type": "array",
"items": { "$ref": "#item" }
},
"$defs": {
"single": {
"$anchor": "item",
"type": "object",
"additionalProperties": { "$ref": "other.json" }
}
}
"$id": "https://example.net/root.json",
"items": {
"type": "array",
"items": { "$ref": "#item" }
},
"$defs": {
"single": {
"$anchor": "item",
"type": "object",
"additionalProperties": { "$ref": "other.json" }
}
}
}
]]>
</artwork>
</figure>
<t>
When an implementation encounters the &lt;#/$defs/single&gt; schema,
it resolves the "$id" URI reference against the current base URI to form
&lt;https://example.net/root.json#item&gt;.
it resolves the "$anchor" value as a fragment name against the current
base URI to form &lt;https://example.net/root.json#item&gt;.
</t>
<t>
When an implementation then looks inside the &lt;#/items&gt; schema, it
Expand Down Expand Up @@ -1764,11 +1764,11 @@
<artwork>
<![CDATA[
{
"$id": "https://example.com/foo",
"items": {
"$id": "https://example.com/bar",
"additionalProperties": { }
}
"$id": "https://example.com/foo",
"items": {
"$id": "https://example.com/bar",
"additionalProperties": { }
}
}
]]>
</artwork>
Expand All @@ -1787,15 +1787,15 @@
<artwork>
<![CDATA[
{
"$id": "https://example.com/foo",
"items": {
"$ref": "bar"
}
"$id": "https://example.com/foo",
"items": {
"$ref": "bar"
}
}

{
"$id": "https://example.com/bar",
"additionalProperties": { }
"$id": "https://example.com/bar",
"additionalProperties": { }
}
]]>
</artwork>
Expand Down