Skip to content

Commit c98a9d4

Browse files
authored
Merge pull request #248 from awwright/issue-244-schema
Core: Restrict usage of $schema some
2 parents f7bb080 + f0643dc commit c98a9d4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

jsonschema-core.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,17 @@
301301
written for this particular version.
302302
</t>
303303
<t>
304-
The root schema of a JSON Schema document SHOULD use this keyword.
305304
The value of this keyword MUST be a <xref target="RFC3986">URI</xref>
306305
(containing a scheme) and this URI MUST be normalized.
307306
The current schema MUST be valid against the meta-schema identified by this URI.
308307
</t>
308+
<t>
309+
The "$schema" keyword SHOULD be used in a root schema.
310+
It MUST NOT appear in subschemas.
311+
</t>
312+
<t>
313+
<cref>While this pattern is likely to remain best practice for schema authoring, implementation behavior is subject to be revised or liberalized in future drafts.</cref>
314+
</t>
309315
<t>
310316
Values for this property are defined in other documents and by other parties.
311317
JSON Schema implementations SHOULD implement support for current and previous published drafts

0 commit comments

Comments
 (0)