From cf0ec7210011272f4e95f70f8c1374593e13c8c5 Mon Sep 17 00:00:00 2001 From: Austin Wright Date: Wed, 12 Oct 2016 00:20:40 -0700 Subject: [PATCH] Validatoin: Reduce some requirement levels where not strictly necessary --- jsonschema-core.xml | 8 +++++--- jsonschema-validation.xml | 16 ++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 1ef1549c..aab6995e 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -291,7 +291,7 @@ The URI is not a network locator, only an identifier. A schema need not be downloadable from the address - if it is a network-addressible URL, and implementations MUST NOT assume they should perform a network + if it is a network-addressible URL, and implementations SHOULD NOT assume they should perform a network operation when they encounter a network-addressible URI. @@ -463,10 +463,12 @@ Link: ; rel="describedby"
Instances MAY specify a "profile" as described in The 'profile' Link Relation. - When used as a media-type parameter, HTTP servers gain the ability to perform Content-Type Negotiation based on profile. The media-type parameter MUST be a whitespace-separated list of URIs (i.e. relative references are invalid). + When used as a media-type parameter, HTTP servers gain the ability to perform Content-Type Negotiation based on profile. + The media-type parameter MUST be a whitespace-separated list of URIs (i.e. relative references are invalid). - The profile URI is opaque and SHOULD NOT automatically be dereferenced. If the implementation does not understand the semantics of the provided profile, the implementation can instead follow the "describedby" links, if any, which may provide information on how to handle the profile. + The profile URI is opaque and SHOULD NOT automatically be dereferenced. + If the implementation does not understand the semantics of the provided profile, the implementation can instead follow the "describedby" links, if any, which may provide information on how to handle the profile. Since "profile" doesn't necessarily point to a network location, the "describedby" relation is used for linking to a downloadable schema. However, for simplicity, schema authors should make these URIs point to the same resource when possible. diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index 30c521ca..b18a21af 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -207,7 +207,7 @@ An undefined value is the same as false. - If "exclusiveMaximum" is true, then a numeric instance MUST NOT be equal to the value specified in "maximum". + If "exclusiveMaximum" is true, then a numeric instance SHOULD NOT be equal to the value specified in "maximum". If "exclusiveMaximum" is false (or not specified), then a numeric instance MAY be equal to the value of "maximum".
@@ -228,7 +228,7 @@ An undefined value is the same as false.
- If "exclusiveMinimum" is true, then a numeric instance MUST NOT be equal to the value specified in "minimum". + If "exclusiveMinimum" is true, then a numeric instance SHOULD NOT be equal to the value specified in "minimum". If "exclusiveMinimum" is false (or not specified), then a numeric instance MAY be equal to the value of "minimum". @@ -288,10 +288,7 @@ it is an object, this object MUST be a valid JSON Schema. - The value of "items" MUST be either an object or an array. If it is an - object, this object MUST be a valid JSON Schema. If it is an array, - items of this array MUST be objects, and each of these objects MUST be a - valid JSON Schema. + The value of "items" MUST be either a schema or array of schemas. Successful validation of an array instance with regards to these two @@ -419,8 +416,7 @@
- The value of "additionalProperties" MUST be a boolean or an object. If - it is an object, it MUST also be a valid JSON Schema. + The value of "additionalProperties" MUST be a boolean or a schema. If "additionalProperties" is absent, it may be considered present with @@ -464,8 +460,8 @@
- The value of this keyword MUST be an array. This array MUST have at - least one element. Elements in the array MUST be unique. + The value of this keyword MUST be an array. This array SHOULD have at + least one element. Elements in the array SHOULD be unique.