Skip to content

Commit 29761cc

Browse files
committed
Clarify how to use "contentSchema"
We know that many schema users find base URIs/IRIs confusing, and that the behavior of implementations in the absence of "$schema" is inconsistent. Without delving into those topics (which are addressed in core, or in RFC 3986), this clarification shows how to use "contentSchema" as a normal subschema from an annotation. It also explains the circumstances under which the extracted annotation value is safe to use. The language attempts to balance the likelihood that readers will not be familiar enough with the restrictions to note this on their own with the desire to minimize re-stating schema processing rules documented in the core specification. This should be enough to encourage readers to check the relevant core specification sections.
1 parent d962a20 commit 29761cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jsonschema-validation.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,10 @@
960960
</t>
961961
<t>
962962
The value of this property MUST be a valid JSON schema. It SHOULD be ignored if
963-
"contentMediaType" is not present.
963+
"contentMediaType" is not present. Accessing the schema through the schema location
964+
IRI included as part of the annotation will ensure that it is correctly processed
965+
as a subschema. Using the extracted annotation value directly is only safe if
966+
the schema is an embedded resource with both "$schema" and an absolute-IRI "$id".
964967
</t>
965968
</section>
966969

0 commit comments

Comments
 (0)