From e5f8d418b5f75adf9a47b73c1e7c75d397d9c963 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Tue, 22 Feb 2022 13:22:23 +0000 Subject: [PATCH 1/3] Clarify that plain name fragments are neither canonical or non-canonical Attempt to resolve #937 Add note and cref in appendix A clarifying that we intended to define a URI phrasing which would avoid the requirement to allow for location shadowing in implementations, as this is tricky. Clarifying that plain name fragments should always be supported, and that they only can work in relation to the base URI of the Schema Resource. Otherwise there could be duplicate plain name fragments and addressing wouldn't work --- jsonschema-core.xml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 8233bee3..8d17c5ce 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -50,7 +50,7 @@ - + Internet Engineering Task Force JSON Schema @@ -1824,10 +1824,10 @@ reference target, is preferable. - An implementation MAY choose not to support addressing schemas - by non-canonical URIs. As such, it is RECOMMENDED that schema authors only - use canonical URIs, as using non-canonical URIs may reduce - schema interoperability. + An implementation MAY choose not to support addressing schema resources + (and their subschemas) by non-canonical URIs. + As such, it is RECOMMENDED that schema authors only use canonical URIs, + as using non-canonical URIs may reduce schema interoperability. This is to avoid requiring implementations to keep track of a whole stack of possible base URIs and JSON Pointer fragments for each, @@ -1836,6 +1836,11 @@ no point in forbidding it, while others have argued that it complicates schema identification and should be forbidden. Feedback on this topic is encouraged. + After some discussion, we feel that we need to remove the use of + "canonical" in favour of talking about JSON Pointers which reference + across schema resource boundaries as undefined or even forbidden behavior + (https://github.com/json-schema-org/json-schema-spec/issues/937, + https://github.com/json-schema-org/json-schema-spec/issues/1183) @@ -3390,6 +3395,18 @@ https://example.com/schemas/common#/$defs/count/minimum + + Note: The fragment part of the URI does not make it canonical or non-canonical, + rather, the base URI used (as part of the full URI with any fragment) is what + determines the canonical nature of the resutling full URI. + + Multiple "canonical" URIs? We Acknowledge this is potetnially confusing, and + direct you to read the CREF located in the + JSON Pointer fragments and embedded schema resources + section for futher comments. + + +
From a5c3b075e247e12159d35b128ba1256f268a0e09 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Mon, 14 Mar 2022 11:03:17 +0000 Subject: [PATCH 2/3] Fix spelling Co-authored-by: Karen Etheridge --- jsonschema-core.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 8d17c5ce..e1a6c181 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -3400,7 +3400,7 @@ https://example.com/schemas/common#/$defs/count/minimum rather, the base URI used (as part of the full URI with any fragment) is what determines the canonical nature of the resutling full URI. - Multiple "canonical" URIs? We Acknowledge this is potetnially confusing, and + Multiple "canonical" URIs? We Acknowledge this is potentially confusing, and direct you to read the CREF located in the JSON Pointer fragments and embedded schema resources section for futher comments. From cdba14ecf662b501eddfec84ad3d695ecfdcbee3 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Mon, 14 Mar 2022 11:08:45 +0000 Subject: [PATCH 3/3] Fix spelling Co-authored-by: Karen Etheridge --- jsonschema-core.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index e1a6c181..07b9436e 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -3398,7 +3398,7 @@ https://example.com/schemas/common#/$defs/count/minimum Note: The fragment part of the URI does not make it canonical or non-canonical, rather, the base URI used (as part of the full URI with any fragment) is what - determines the canonical nature of the resutling full URI. + determines the canonical nature of the resulting full URI. Multiple "canonical" URIs? We Acknowledge this is potentially confusing, and direct you to read the CREF located in the