From 29761ccaaac6ace399f8991c739a5e89bf2dc9df Mon Sep 17 00:00:00 2001 From: "Henry H. Andrews" Date: Mon, 21 Nov 2022 13:06:18 -0800 Subject: [PATCH] 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. --- jsonschema-validation.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index 22a67a0e..aa15895f 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -960,7 +960,10 @@ The value of this property MUST be a valid JSON schema. It SHOULD be ignored if - "contentMediaType" is not present. + "contentMediaType" is not present. Accessing the schema through the schema location + IRI included as part of the annotation will ensure that it is correctly processed + as a subschema. Using the extracted annotation value directly is only safe if + the schema is an embedded resource with both "$schema" and an absolute-IRI "$id".