From 1d1083277bd31601f81bd2d7301d8531c1fe7dfd Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Wed, 28 Dec 2016 11:34:54 -0800 Subject: [PATCH] Remove boolean form of exclusive* keywords. --- jsonschema-validation.xml | 26 +++++++------------------- schema.json | 13 +++---------- 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index c979e8c0..6c46ff51 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -213,7 +213,6 @@ "additionalProperties", whose behavior is defined in terms of "properties" and "patternProperties"; "additionalItems", whose behavior is defined in terms of "items"; and - "minimum" and "maximum", whose behavior may change for a special value of "exclusiveMinimum" and "exclusiveMaximum", respectively. @@ -248,21 +247,16 @@ The value of "maximum" MUST be a number, representing an inclusive upper limit for a numeric instance. - If "exclusiveMaximum" is true, see the validation rules for that keyword instead. - Else if the instance is a number, then this keyword validates only if the instance is less than or exactly equal to "maximum". + If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to "maximum".
- The value of "exclusiveMaximum" MUST be number, representing an exclusive upper limit for a numeric instance, or a boolean. Schemas SHOULD NOT use the boolean form. + The value of "exclusiveMaximum" MUST be number, representing an exclusive upper limit for a numeric instance. - The boolean form of "exclusiveMaximum" is expected to be removed in the future. - - - If "exclusiveMaximum" is true, "maximum" is a number, and the instance is a number, then the instance is valid only if it has a value strictly less than (not equal to) "maximum". - Else if "exclusiveMaximum" is a number and the instance is a number, then the instance is valid only if it has a value strictly less than (not equal to) "exclusiveMaximum". + If the instance is a number, then the instance is valid only if it has a value strictly less than (not equal to) "exclusiveMaximum".
@@ -271,21 +265,16 @@ The value of "minimum" MUST be a number, representing an inclusive upper limit for a numeric instance. - If "exclusiveMinimum" is true, see the validation rules for that keyword instead. - Else if the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to "minimum". + If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to "minimum".
- The value of "exclusiveMinimum" MUST be number, representing an exclusive upper limit for a numeric instance, or a boolean. Schemas SHOULD NOT use the boolean form. - - - The boolean form of "exclusiveMinimum" is expected to be removed in the future. + The value of "exclusiveMinimum" MUST be number, representing an exclusive upper limit for a numeric instance. - If "exclusiveMinimum" is true, "minimum" is a number, and the instance is a number, then the instance is valid only if it has a value strictly greater than (not equal to) "minimum". - Else if "exclusiveMinimum" is a number and the instance is a number, then the instance is valid only if it has a value strictly greater than (not equal to) "exclusiveMinimum". + If the instance is a number, then the instance is valid only if it has a value strictly greater than (not equal to) "exclusiveMinimum".
@@ -691,8 +680,7 @@ "definitions": { "positiveInteger": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": 0, } } } diff --git a/schema.json b/schema.json index 15502e9b..ef1ab10e 100644 --- a/schema.json +++ b/schema.json @@ -54,22 +54,19 @@ "default": {}, "multipleOf": { "type": "number", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": 0 }, "maximum": { "type": "number" }, "exclusiveMaximum": { - "type": "boolean", - "default": false + "type": "number" }, "minimum": { "type": "number" }, "exclusiveMinimum": { - "type": "boolean", - "default": false + "type": "number" }, "maxLength": { "$ref": "#/definitions/positiveInteger" }, "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, @@ -144,9 +141,5 @@ "oneOf": { "$ref": "#/definitions/schemaArray" }, "not": { "$ref": "#" } }, - "dependencies": { - "exclusiveMaximum": [ "maximum" ], - "exclusiveMinimum": [ "minimum" ] - }, "default": {} }