Skip to content

Commit 29f4a12

Browse files
committed
Disallow "#" as an $id.
In a document root schema, "$id": "#" is a no-op, and in an embedded schema resource root, it results in the embeddded resource having the same URI as its context resource. Given that the specificaiton says implementations SHOULD raise an error for duplicate IRIs, there is no reason to allow this form.
1 parent d775a9d commit 29f4a12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jsonschema-core.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,8 +1353,8 @@
13531353
</t>
13541354
<t>
13551355
If present, the value for this keyword MUST be a string, and MUST represent a
1356-
valid <xref target="RFC3987">IRI-reference</xref>. This IRI-reference
1357-
SHOULD be normalized, and MUST resolve to an
1356+
valid <xref target="RFC3987">IRI-reference</xref> with a non-empty non-fragment
1357+
component. This IRI-reference SHOULD be normalized, and MUST resolve to an
13581358
<xref target="RFC3987">absolute-IRI</xref> (without a fragment),
13591359
or to a IRI with an empty fragment.
13601360
</t>

0 commit comments

Comments
 (0)