Skip to content

Commit 41fca9f

Browse files
authored
Merge pull request #210 from handrews/excl-no-bool
Remove boolean form of exclusive* keywords.
2 parents cd171f5 + 1d10832 commit 41fca9f

File tree

2 files changed

+10
-29
lines changed

2 files changed

+10
-29
lines changed

jsonschema-validation.xml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@
213213
<list>
214214
<t>"additionalProperties", whose behavior is defined in terms of "properties" and "patternProperties";</t>
215215
<t>"additionalItems", whose behavior is defined in terms of "items"; and</t>
216-
<t>"minimum" and "maximum", whose behavior may change for a special value of "exclusiveMinimum" and "exclusiveMaximum", respectively.</t>
217216
</list>
218217
</t>
219218
</section>
@@ -248,21 +247,16 @@
248247
The value of "maximum" MUST be a number, representing an inclusive upper limit for a numeric instance.
249248
</t>
250249
<t>
251-
If "exclusiveMaximum" is true, see the validation rules for that keyword instead.
252-
Else if the instance is a number, then this keyword validates only if the instance is less than or exactly equal to "maximum".
250+
If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to "maximum".
253251
</t>
254252
</section>
255253

256254
<section title="exclusiveMaximum">
257255
<t>
258-
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.
256+
The value of "exclusiveMaximum" MUST be number, representing an exclusive upper limit for a numeric instance.
259257
</t>
260258
<t>
261-
<cref>The boolean form of "exclusiveMaximum" is expected to be removed in the future.</cref>
262-
</t>
263-
<t>
264-
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".
265-
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".
259+
If the instance is a number, then the instance is valid only if it has a value strictly less than (not equal to) "exclusiveMaximum".
266260
</t>
267261
</section>
268262

@@ -271,21 +265,16 @@
271265
The value of "minimum" MUST be a number, representing an inclusive upper limit for a numeric instance.
272266
</t>
273267
<t>
274-
If "exclusiveMinimum" is true, see the validation rules for that keyword instead.
275-
Else if the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to "minimum".
268+
If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to "minimum".
276269
</t>
277270
</section>
278271

279272
<section title="exclusiveMinimum">
280273
<t>
281-
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.
282-
</t>
283-
<t>
284-
<cref>The boolean form of "exclusiveMinimum" is expected to be removed in the future.</cref>
274+
The value of "exclusiveMinimum" MUST be number, representing an exclusive upper limit for a numeric instance.
285275
</t>
286276
<t>
287-
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".
288-
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".
277+
If the instance is a number, then the instance is valid only if it has a value strictly greater than (not equal to) "exclusiveMinimum".
289278
</t>
290279
</section>
291280

@@ -691,8 +680,7 @@
691680
"definitions": {
692681
"positiveInteger": {
693682
"type": "integer",
694-
"minimum": 0,
695-
"exclusiveMinimum": true
683+
"exclusiveMinimum": 0,
696684
}
697685
}
698686
}

schema.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,19 @@
5454
"default": {},
5555
"multipleOf": {
5656
"type": "number",
57-
"minimum": 0,
58-
"exclusiveMinimum": true
57+
"exclusiveMinimum": 0
5958
},
6059
"maximum": {
6160
"type": "number"
6261
},
6362
"exclusiveMaximum": {
64-
"type": "boolean",
65-
"default": false
63+
"type": "number"
6664
},
6765
"minimum": {
6866
"type": "number"
6967
},
7068
"exclusiveMinimum": {
71-
"type": "boolean",
72-
"default": false
69+
"type": "number"
7370
},
7471
"maxLength": { "$ref": "#/definitions/positiveInteger" },
7572
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
@@ -144,9 +141,5 @@
144141
"oneOf": { "$ref": "#/definitions/schemaArray" },
145142
"not": { "$ref": "#" }
146143
},
147-
"dependencies": {
148-
"exclusiveMaximum": [ "maximum" ],
149-
"exclusiveMinimum": [ "minimum" ]
150-
},
151144
"default": {}
152145
}

0 commit comments

Comments
 (0)