From 6d30f41bc939bbba937e682f2ef99dc9764c7b51 Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Fri, 30 Nov 2018 13:13:49 -0800 Subject: [PATCH] More guidance on initial base URI Nudge readers a bit more clearly to consider things like 'file://' URLs and not just network URLs when constructing a location-based base URI. Also refer directly to the rules for application-specific default URIs. --- jsonschema-core.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 567d304e..e95dcb98 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -848,7 +848,8 @@
To differentiate between schemas in a vast ecosystem, schemas are - identified by URI, and can embed references to other schemas by specifying their URI. + identified by URI, and can embed references + to other schemas by specifying their URI.
@@ -858,7 +859,14 @@ Informatively, the initial base URI of a schema is the URI at which it was - found, or a suitable substitute URI if none is known. + found, whether that was a network location, a local filesystem, or any other + situation identifiable by a URI of any known scheme. + + + If no source is known, or no URI scheme is known for the source, a suitable + implementation-specific default URI MAY be used as described in + RFC 3986 Section 5.1.4. It is RECOMMENDED + that implementations document any default base URI that they assume.