From 2a788d869bbe0c0c72b1a222f87a0c03145eb677 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Sat, 29 Aug 2020 17:02:26 +0100 Subject: [PATCH 01/22] First attempt to resolve #936 Define Compound Schema Document and associated concerns --- jsonschema-core.xml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 18ced482..c0c8f86b 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1845,6 +1845,48 @@ +
+ + A Compound Schema Document is defined as JSON document (sometimes called a "dereferenced" or + "bundled" schema) which has multiple embedded JSON Schema Resources bundled into the same + document to ease transportation. + + + Each embedded Schema Resource MUST be treated as an individual Schema Resource, following standard + schema loading and processing requirements, including determining voacbulary support. + +
+ + A Compound Schema Document is created by replacing references (such as "$ref") with an + embedded version of the referenced Schema Resource. + + + Each embedded JSON Schema Resource (and the document's root) MUST identify itself + with an absolute URI using the "$id" keyword, and SHOULD make use of the "$schema" + keyword to identify the dialect it is using, in the root of the schema resource. + + + When a reference applicator is dereferenced as part of the bundling process, the Schema Resource + MUST NOT be embedded by replacing the schema object from which it was referenced, or by wrapping + in other applicator keywords. In stead, a bundled Schema Resource MUST be located in `$defs`, + where the key is the `$id` of the Schema Resource, which MUST then be referenced using `$ref`. + +
+
+ + Given a Compound Schema Document may have embedded resources which idenfiy as using different + dialects, it is NOT RECOMMENDED that these documents are validated by applying a meta-schema + to the Compound Schema Document as an instance. It is RECOMMENDED that an alternate + validation process be provided in order to validate Compound Schema Documents + (such as a differnet function). + + + A Compound Schema Document in which all embedded resources idenfity as using the same + dialect MAY be validated by applying the appropriate meta-schema. + +
+
+
From 67c00d2e838407df8eb6757773aa496a4898b443 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Sun, 27 Sep 2020 16:09:28 +0100 Subject: [PATCH 02/22] Update jsonschema-core.xml Fix typo 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 c0c8f86b..4d63e2a3 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1868,7 +1868,7 @@ When a reference applicator is dereferenced as part of the bundling process, the Schema Resource MUST NOT be embedded by replacing the schema object from which it was referenced, or by wrapping - in other applicator keywords. In stead, a bundled Schema Resource MUST be located in `$defs`, + in other applicator keywords. Instead, a bundled Schema Resource MUST be located in `$defs`, where the key is the `$id` of the Schema Resource, which MUST then be referenced using `$ref`.
From 2dc975a94d8480a1e2f7a55448dbe035fde8fa33 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Sun, 27 Sep 2020 16:12:57 +0100 Subject: [PATCH 03/22] Update jsonschema-core.xml Fix typo 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 4d63e2a3..e363b187 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1878,7 +1878,7 @@ dialects, it is NOT RECOMMENDED that these documents are validated by applying a meta-schema to the Compound Schema Document as an instance. It is RECOMMENDED that an alternate validation process be provided in order to validate Compound Schema Documents - (such as a differnet function). + (such as a different function). A Compound Schema Document in which all embedded resources idenfity as using the same From d3f6274b0a20c3c05e1b333a4cda6406d9797645 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Sun, 27 Sep 2020 22:55:27 +0100 Subject: [PATCH 04/22] Use correct termonology 'by-reference applicator' --- jsonschema-core.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index e363b187..97f4a1b8 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1866,7 +1866,7 @@ keyword to identify the dialect it is using, in the root of the schema resource. - When a reference applicator is dereferenced as part of the bundling process, the Schema Resource + When a by-reference applicator is dereferenced as part of the bundling process, the Schema Resource MUST NOT be embedded by replacing the schema object from which it was referenced, or by wrapping in other applicator keywords. Instead, a bundled Schema Resource MUST be located in `$defs`, where the key is the `$id` of the Schema Resource, which MUST then be referenced using `$ref`. From ac9ec4fa096a40c4dd31d953e310d04a84c91d9e Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Sun, 27 Sep 2020 22:59:37 +0100 Subject: [PATCH 05/22] Don't mention 'derferenced' schemas in the section related to compound document. The phrase has a specific meaning --- jsonschema-core.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 97f4a1b8..437734e4 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1847,9 +1847,9 @@
- A Compound Schema Document is defined as JSON document (sometimes called a "dereferenced" or - "bundled" schema) which has multiple embedded JSON Schema Resources bundled into the same - document to ease transportation. + A Compound Schema Document is defined as JSON document (sometimes called a "bundled" schema) + which has multiple embedded JSON Schema Resources bundled into the same document to + ease transportation. Each embedded Schema Resource MUST be treated as an individual Schema Resource, following standard From 3c99506743f36d929de219119cdb1b6bff4e70ba Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Mon, 28 Sep 2020 23:20:56 +0100 Subject: [PATCH 06/22] Rephrase definition of Compound Schema Document to only be about transcluding external Schema Resources --- jsonschema-core.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 437734e4..01bbe3c8 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1857,8 +1857,9 @@
- A Compound Schema Document is created by replacing references (such as "$ref") with an - embedded version of the referenced Schema Resource. + A Compound Schema Document is created by taking references (such as "$ref") + to an external Schema Resource and embedding the referenced Schema Resources + within the referreing document. Each embedded JSON Schema Resource (and the document's root) MUST identify itself From 7beb355aa95e0cd0a976c84cda7db7af44644e9d Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Mon, 28 Sep 2020 23:39:46 +0100 Subject: [PATCH 07/22] Move some content of use of schema within Compound Document resources, to said section --- jsonschema-core.xml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 01bbe3c8..fe942a42 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1180,16 +1180,6 @@ It MUST NOT appear in non-resource root schema objects. If absent from the document root schema, the resulting behavior is implementation-defined. - - If multiple schema resources are present in a single document, then - schema resources which do not have a "$schema" keyword in their root - schema object MUST be processed as if "$schema" were present with the - same value as for the immediately enclosing resource. - - - Embedded schema resources MAY specify different "$schema" values from their - enclosing resource, as any schema that can be referenced can also be embedded. - Values for this property are defined elsewhere in this and other documents, and by other parties. @@ -1873,6 +1863,19 @@ where the key is the `$id` of the Schema Resource, which MUST then be referenced using `$ref`.
+
+ + In addition to the rules defining the use of the "$schema" keyword , + if multiple schema resources are present in a single document, then + schema resources which do not have a "$schema" keyword in their root + schema object MUST be processed as if "$schema" were present with the + same value as for the immediately enclosing resource. + + + Embedded schema resources MAY specify different "$schema" values from their + enclosing resource, as any schema that can be referenced can also be embedded. + +
Given a Compound Schema Document may have embedded resources which idenfiy as using different From c44829d911e9543f2b415cd95d79a092e59f27be Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Mon, 28 Sep 2020 23:49:27 +0100 Subject: [PATCH 08/22] Rephrase recomended validation process for processing a schema document, as it is possible to identify embedded schema resources if you know it's a schema as opposed to just an instance. --- jsonschema-core.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index fe942a42..0430bbc1 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1865,7 +1865,8 @@
- In addition to the rules defining the use of the "$schema" keyword , + In addition to the rules defining the use of the "$schema" keyword + , if multiple schema resources are present in a single document, then schema resources which do not have a "$schema" keyword in their root schema object MUST be processed as if "$schema" were present with the @@ -1881,8 +1882,12 @@ Given a Compound Schema Document may have embedded resources which idenfiy as using different dialects, it is NOT RECOMMENDED that these documents are validated by applying a meta-schema to the Compound Schema Document as an instance. It is RECOMMENDED that an alternate - validation process be provided in order to validate Compound Schema Documents - (such as a different function). + validation process be provided in order to validate Schema Documents. + + If you know a schema is what's being validated, you can identify if the schemas + is a Compound Schema Document or not, by way of use of "$id", which identifies an + embedded resource when used not at the document's root. + A Compound Schema Document in which all embedded resources idenfity as using the same From 959fb2bd2882518f26f83e5379e1631724d2c240 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Tue, 29 Sep 2020 00:05:40 +0100 Subject: [PATCH 09/22] Fix invalid XML --- jsonschema-core.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 0430bbc1..fe24061a 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1866,7 +1866,7 @@
In addition to the rules defining the use of the "$schema" keyword - , + , if multiple schema resources are present in a single document, then schema resources which do not have a "$schema" keyword in their root schema object MUST be processed as if "$schema" were present with the From 375cb26107e6f9d219ee0f6686615d95c18126e2 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Tue, 29 Sep 2020 22:32:05 +0100 Subject: [PATCH 10/22] Fix bad reference --- jsonschema-core.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index fe24061a..a60f27ad 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1159,7 +1159,7 @@ Meta-schema authoring is an advanced usage of JSON Schema, so the design of meta-schema features emphasizes flexibility over simplicity. -
+
The "$schema" keyword is both used as a JSON Schema feature set identifier and as the identifier of a resource which is itself a JSON Schema, which describes the @@ -1865,8 +1865,8 @@
- In addition to the rules defining the use of the "$schema" keyword - , + In addition to the rules defining the use of + the "$schema" keyword, if multiple schema resources are present in a single document, then schema resources which do not have a "$schema" keyword in their root schema object MUST be processed as if "$schema" were present with the From 08e9e60fcb0640e159b4c2dec418dc6445bf0e69 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Tue, 29 Sep 2020 22:47:47 +0100 Subject: [PATCH 11/22] Rephrase process of schema bundling to make clear that existing referenes need to change, and the of an embedded shema resource is still used as the referene string for by-reference applicator keywords. --- jsonschema-core.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index a60f27ad..609644aa 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1859,8 +1859,15 @@ When a by-reference applicator is dereferenced as part of the bundling process, the Schema Resource MUST NOT be embedded by replacing the schema object from which it was referenced, or by wrapping - in other applicator keywords. Instead, a bundled Schema Resource MUST be located in `$defs`, - where the key is the `$id` of the Schema Resource, which MUST then be referenced using `$ref`. + in other applicator keywords. Instead, a bundled Schema Resource MUST be located as a value of + a "$defs" object at the containing schemas root. The key of the "$defs" for the now embedded + Schema Resource MAY be the "$id" of the bundled schema or some other form of application defined + unique identifer (such as a UUID). This key is not intended to be referenced in JSON Schema, but may + be used by an application to aid the bundling process. + + + References in the containing schema document to the previously external Schema Resources + MUST NOT be changed, and now resolve to a schema using the "$id" of an embedded Schema Resource.
From f82ee5510e3d9a41dc53d6cce0871144d2473bfe Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Tue, 6 Oct 2020 21:43:19 +0100 Subject: [PATCH 12/22] Clarify that the bundling process is not the only way to create a Compound Schema Document --- jsonschema-core.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 609644aa..7def9c35 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1847,9 +1847,9 @@
- A Compound Schema Document is created by taking references (such as "$ref") - to an external Schema Resource and embedding the referenced Schema Resources - within the referreing document. + The bundling process for creating a Compound Schema Document is done by taking + references (such as "$ref") to an external Schema Resource and embedding the referenced + Schema Resources within the referreing document. Each embedded JSON Schema Resource (and the document's root) MUST identify itself @@ -1869,6 +1869,11 @@ References in the containing schema document to the previously external Schema Resources MUST NOT be changed, and now resolve to a schema using the "$id" of an embedded Schema Resource. + + While the bundling process will often be the main method for creating a Compound Schema Document, + it is also possible and expected that some will be created by hand, potentially without individual + Schema Resources existing on their own previously. +
From 6cf7022989614ac85879fa76e272bcf39b20af25 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Tue, 6 Oct 2020 21:46:36 +0100 Subject: [PATCH 13/22] Document root is only SHOULD for $id. $id requirements for document root are already covered, and shouldn't be overriden. --- jsonschema-core.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 7def9c35..d2122ef9 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1852,9 +1852,9 @@ Schema Resources within the referreing document. - Each embedded JSON Schema Resource (and the document's root) MUST identify itself - with an absolute URI using the "$id" keyword, and SHOULD make use of the "$schema" - keyword to identify the dialect it is using, in the root of the schema resource. + Each embedded JSON Schema Resource MUST identify itself with an absolute URI using the "$id" keyword, + and SHOULD make use of the "$schema" keyword to identify the dialect it is using, in the root of the + schema resource. When a by-reference applicator is dereferenced as part of the bundling process, the Schema Resource From 976a6fb2e85bcacb83cb38ccf88bed63e4a8ec3a Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Tue, 6 Oct 2020 22:09:30 +0100 Subject: [PATCH 14/22] Use correct terms for bundling process of Compound Schema Documents Previously 'dereferenced' was used incorrectly. Now "bundling" is clearly defined, and MUST and MUST NOT are split for clairty. --- jsonschema-core.xml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index d2122ef9..75130b06 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1847,7 +1847,7 @@
- The bundling process for creating a Compound Schema Document is done by taking + The bundling process for creating a Compound Schema Document is defined as taking references (such as "$ref") to an external Schema Resource and embedding the referenced Schema Resources within the referreing document. @@ -1857,13 +1857,16 @@ schema resource. - When a by-reference applicator is dereferenced as part of the bundling process, the Schema Resource - MUST NOT be embedded by replacing the schema object from which it was referenced, or by wrapping - in other applicator keywords. Instead, a bundled Schema Resource MUST be located as a value of - a "$defs" object at the containing schemas root. The key of the "$defs" for the now embedded - Schema Resource MAY be the "$id" of the bundled schema or some other form of application defined - unique identifer (such as a UUID). This key is not intended to be referenced in JSON Schema, but may - be used by an application to aid the bundling process. + When the Schema Resource referenced by a by-reference applicator is bundled, the Schema Resource + MUST be located as a value of a "$defs" object at the containing schemas root. + The key of the "$defs" for the now embedded Schema Resource MAY be the "$id" of the bundled schema + or some other form of application defined unique identifer (such as a UUID). This key is not + intended to be referenced in JSON Schema, but may be used by an application to aid the + bundling process. + + + Bundled Schema Resource MUST NOT be bundled by replacing the schema object from which it was + referenced, or by wrapping the Schema Resource in other applicator keywords. References in the containing schema document to the previously external Schema Resources From 49d77b2c13d4191f012f9ae739ba51232241bb99 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Tue, 6 Oct 2020 22:10:54 +0100 Subject: [PATCH 15/22] Fix grammar --- jsonschema-core.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 75130b06..36af20c0 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1858,7 +1858,7 @@ When the Schema Resource referenced by a by-reference applicator is bundled, the Schema Resource - MUST be located as a value of a "$defs" object at the containing schemas root. + MUST be located as a value of a "$defs" object at the containing schema's root. The key of the "$defs" for the now embedded Schema Resource MAY be the "$id" of the bundled schema or some other form of application defined unique identifer (such as a UUID). This key is not intended to be referenced in JSON Schema, but may be used by an application to aid the From 5d36e175ddb6f2dac5704074c222ebb15c3c6f29 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Tue, 6 Oct 2020 22:33:53 +0100 Subject: [PATCH 16/22] Small gramatical changes --- jsonschema-core.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 36af20c0..25042a2c 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1888,13 +1888,13 @@ same value as for the immediately enclosing resource. - Embedded schema resources MAY specify different "$schema" values from their - enclosing resource, as any schema that can be referenced can also be embedded. + Since any schema that can be referenced can also be embedded, embedded schema resources MAY + specify different "$schema" values from their enclosing resource.
- Given a Compound Schema Document may have embedded resources which idenfiy as using different + Given that a Compound Schema Document may have embedded resources which idenfiy as using different dialects, it is NOT RECOMMENDED that these documents are validated by applying a meta-schema to the Compound Schema Document as an instance. It is RECOMMENDED that an alternate validation process be provided in order to validate Schema Documents. From 4eacfe3d03a9b7ef946d4a42269bad734ce6c62a Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Tue, 6 Oct 2020 22:52:01 +0100 Subject: [PATCH 17/22] Better specify the process of validating a Compound Schema Document --- jsonschema-core.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 25042a2c..99d25cdb 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1895,9 +1895,10 @@
Given that a Compound Schema Document may have embedded resources which idenfiy as using different - dialects, it is NOT RECOMMENDED that these documents are validated by applying a meta-schema + dialects, these documents SHOULD NOT be validated by applying a meta-schema to the Compound Schema Document as an instance. It is RECOMMENDED that an alternate - validation process be provided in order to validate Schema Documents. + validation process be provided in order to validate Schema Documents. Each Schema Resource + SHOULD be separately validated against its associated meta-schema. If you know a schema is what's being validated, you can identify if the schemas is a Compound Schema Document or not, by way of use of "$id", which identifies an @@ -1906,7 +1907,8 @@ A Compound Schema Document in which all embedded resources idenfity as using the same - dialect MAY be validated by applying the appropriate meta-schema. + dialec, or in which "$schema" is omitted and therefore defaults to that of the enclosing resource, + MAY be validated by applying the appropriate meta-schema.
From b27a703bf8ff2e36262f1277333e2c1dc11d7e8d Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Wed, 7 Oct 2020 13:06:13 +0100 Subject: [PATCH 18/22] Remove non-required phrasing --- jsonschema-core.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 99d25cdb..7e8361f1 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1880,9 +1880,7 @@
- In addition to the rules defining the use of - the "$schema" keyword, - if multiple schema resources are present in a single document, then + If multiple schema resources are present in a single document, then schema resources which do not have a "$schema" keyword in their root schema object MUST be processed as if "$schema" were present with the same value as for the immediately enclosing resource. From 9f51c1996df62fe3696e9fddd95ff3ef02a64ec4 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Tue, 20 Oct 2020 21:36:05 +0100 Subject: [PATCH 19/22] Fix typos Co-authored-by: Karen Etheridge --- jsonschema-core.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 7e8361f1..e82a6de5 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1843,13 +1843,13 @@ Each embedded Schema Resource MUST be treated as an individual Schema Resource, following standard - schema loading and processing requirements, including determining voacbulary support. + schema loading and processing requirements, including determining vocabulary support.
The bundling process for creating a Compound Schema Document is defined as taking references (such as "$ref") to an external Schema Resource and embedding the referenced - Schema Resources within the referreing document. + Schema Resources within the referring document. Each embedded JSON Schema Resource MUST identify itself with an absolute URI using the "$id" keyword, @@ -1892,7 +1892,7 @@
- Given that a Compound Schema Document may have embedded resources which idenfiy as using different + Given that a Compound Schema Document may have embedded resources which identify as using different dialects, these documents SHOULD NOT be validated by applying a meta-schema to the Compound Schema Document as an instance. It is RECOMMENDED that an alternate validation process be provided in order to validate Schema Documents. Each Schema Resource From 0409c724a88c07fb1abac4dbe6ced529e7eb9704 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Tue, 20 Oct 2020 22:15:03 +0100 Subject: [PATCH 20/22] Specifically mention that bundling is done in such a way so as to avoid the need to alter URIs used for referencing --- jsonschema-core.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index e82a6de5..f5ea1388 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1849,7 +1849,9 @@ The bundling process for creating a Compound Schema Document is defined as taking references (such as "$ref") to an external Schema Resource and embedding the referenced - Schema Resources within the referring document. + Schema Resources within the referring document. Bundling is done in such a way that + all URIs (used for referencing) in the base document and any referenced/embedded + documents do not require altering. Each embedded JSON Schema Resource MUST identify itself with an absolute URI using the "$id" keyword, From 13867cdddffe5b9dfd86611bfccf70ecc6827077 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Tue, 20 Oct 2020 22:22:58 +0100 Subject: [PATCH 21/22] Specifically mention why referenes MUST NOT be changed when creating a Compound Schema Document --- jsonschema-core.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index f5ea1388..e972f699 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -1871,8 +1871,10 @@ referenced, or by wrapping the Schema Resource in other applicator keywords. - References in the containing schema document to the previously external Schema Resources - MUST NOT be changed, and now resolve to a schema using the "$id" of an embedded Schema Resource. + In order to produce identical output, references in the containing schema document to the + previously external Schema Resources MUST NOT be changed, and now resolve to a schema using the + "$id" of an embedded Schema Resource. Such identical output includes validation evaluation and URIs + or paths used in resulting annotations or errors. While the bundling process will often be the main method for creating a Compound Schema Document, From 20e1910f2306764ac009965094d9f4d6ba06c554 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Sun, 25 Oct 2020 14:28:54 +0000 Subject: [PATCH 22/22] Add Compound Schema Document to changelog --- jsonschema-core.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index e972f699..4cc95a71 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -3924,7 +3924,7 @@ https://example.com/schemas/common#/$defs/count/minimum Rename $recursive* to $dynamic* $dynamicAnchor defines a fragment like $anchor $dynamic* (previously $recursive) no longer use runtime base URI determination - + Define Compound Schema Documents (bundle) and processing