Skip to content

Commit ccebf95

Browse files
committed
Further clarify $id base URI determination.
"object as a whole" could be read to mean the entire schema document, ignoring any intervening $id keywords. This clarifies that that is not the case.
1 parent d9304de commit ccebf95

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

jsonschema-core.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,12 @@
431431

432432
<section title='The "$id" keyword' anchor="id-keyword">
433433
<t>
434-
The "$id" keyword defines a URI for the schema,
435-
and the base URI that other URI references within the schema are resolved against.
436-
The "$id" keyword itself is resolved against the base URI that the object as a
437-
whole appears in.
434+
The "$id" keyword defines a URI for the schema, and the base URI that
435+
other URI references within the schema are resolved against.
436+
A subschema's "$id" is resolved against the base URI of its parent schema.
437+
If no parent sets an explicit base with "$id", the base URI is that of the
438+
entire document, as determined per
439+
<xref target="RFC3986">RFC 3986 section 5</xref>.
438440
</t>
439441
<t>
440442
If present, the value for this keyword MUST be a string, and MUST represent a

0 commit comments

Comments
 (0)