From 7435bcb81fa6566950ce547c5841bb761ef4e10a Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Thu, 28 Jun 2018 13:51:42 +0100 Subject: [PATCH 1/3] $ref no longer effects other properties in the same object. Updated phrasing to align with current wording. Resolves #514 and #523 --- jsonschema-core.xml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 60a976f0..49e8520e 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -955,15 +955,19 @@
- The "$ref" keyword is used to reference a schema, and provides the ability to - validate recursive structures through self-reference. + The "$ref" keyword can be used to reference a schema which is to be applied to the + current instance location. "$ref" is an applicator key word, applying the referred + schema to the instance. - - An object schema with a "$ref" property MUST be interpreted as a "$ref" reference. - The value of the "$ref" property MUST be a URI Reference. ++ ++ The value of the "$ref" property MUST be a string which is a URI Reference. Resolved against the current URI base, it identifies the URI of a schema to use. - All other properties in a "$ref" object MUST be ignored. + + As the value of "$ref" is a URI Reference, this allows the posibility to externalise or ++ shard a schema across multiple files, and provides the ability to validate recursive structures ++ through self-reference. ++ The URI is not a network locator, only an identifier. A schema need not be downloadable from the address if it is a network-addressable URL, and From e1b17680f0426b3b521c16a647e976f0d5f6160c Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Thu, 28 Jun 2018 14:18:52 +0100 Subject: [PATCH 2/3] Fixed white space issues... xml2rfc is really picky! --- jsonschema-core.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 49e8520e..c2b76a53 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -959,15 +959,15 @@ current instance location. "$ref" is an applicator key word, applying the referred schema to the instance. -+ -+ The value of the "$ref" property MUST be a string which is a URI Reference. + + The value of the "$ref" property MUST be a string which is a URI Reference. Resolved against the current URI base, it identifies the URI of a schema to use. As the value of "$ref" is a URI Reference, this allows the posibility to externalise or -+ shard a schema across multiple files, and provides the ability to validate recursive structures -+ through self-reference. -+ + shard a schema across multiple files, and provides the ability to validate recursive structures + through self-reference. + The URI is not a network locator, only an identifier. A schema need not be downloadable from the address if it is a network-addressable URL, and From a3d8df3e89bf1ff2bb99decbbc4e3d167a30de25 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Fri, 29 Jun 2018 11:27:17 +0100 Subject: [PATCH 3/3] Fix typo and change word --- jsonschema-core.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index c2b76a53..508266db 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -964,8 +964,8 @@ Resolved against the current URI base, it identifies the URI of a schema to use. - As the value of "$ref" is a URI Reference, this allows the posibility to externalise or - shard a schema across multiple files, and provides the ability to validate recursive structures + As the value of "$ref" is a URI Reference, this allows the possibility to externalise or + divide a schema across multiple files, and provides the ability to validate recursive structures through self-reference.