From 7435bcb81fa6566950ce547c5841bb761ef4e10a Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Thu, 28 Jun 2018 13:51:42 +0100 Subject: [PATCH] $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