@@ -149,45 +149,53 @@ Range
149
149
'''''
150
150
151
151
Ranges of numbers are specified using a combination of the
152
- ``minimum ``, ``maximum ``, ``exclusiveMinimum `` and
153
- ``exclusiveMaximum `` keywords .
152
+ ``minimum `` and ``maximum `` keywords (or ``exclusiveMinimum `` and
153
+ ``exclusiveMaximum `` for expressing exclusive range) .
154
154
155
- - ``minimum `` specifies a minimum numeric value.
155
+ - ``minimum `` specifies an inclusive lower limit for a numeric instance,
156
+ i.e., :math: `x \ge\mathrm {min}`.
157
+
158
+ - ``exclusiveMinimum `` specifies an exclusive lower limit for a numeric instance,
159
+ i.e., :math: `x > \mathrm {min}`.
156
160
157
- - ``exclusiveMinimum `` is a boolean. When ``true ``, it indicates that
158
- the range excludes the minimum value, i.e., :math: `x >
159
- \mathrm {min}`. When ``false `` (or not included), it indicates that
160
- the range includes the minimum value, i.e., :math: `x \ge
161
- \mathrm {min}`.
162
-
163
- - ``maximum `` specifies a maximum numeric value.
164
-
165
- - ``exclusiveMaximum `` is a boolean. When ``true ``, it indicates that
166
- the range excludes the maximum value, i.e., :math: `x <
167
- \mathrm {max}`. When ``false `` (or not included), it indicates that
168
- the range includes the maximum value, i.e., :math: `x \le
169
- \mathrm {max}`.
161
+ - ``maximum `` specifies an inclusive upper limit for a numeric instance,
162
+ i.e., :math: `x \le\mathrm {max}`.
163
+
164
+ - ``exclusiveMaximum `` specifies an exclusive upper limit for a numeric
165
+ instance. , i.e., :math: `x < \mathrm {max}`.
170
166
171
167
.. schema_example ::
172
168
173
169
{
174
170
"type": "number",
175
171
"minimum": 0,
176
- "maximum": 100,
177
- "exclusiveMaximum": true
172
+ "maximum": 100
178
173
}
179
174
--X
180
175
// Less than ``minimum ``:
181
176
-1
182
177
--
183
- // ``exclusiveMinimum `` was not specified , so 0 is included :
178
+ // ``minimum `` is inclusive , so 0 is valid :
184
179
0
185
180
--
186
181
10
187
182
--
188
183
99
189
184
--X
190
- // ``exclusiveMaximum `` is ``true ``, so 100 is not included:
185
+ // ``maximum `` is inclusive, so 100 is valid:
186
+ 100
187
+ --X
188
+ // Greater than ``maximum ``:
189
+ 101
190
+
191
+ .. schema_example ::
192
+ {
193
+ "type": "number",
194
+ "minimum": 0,
195
+ "exclusiveMaximum": 100
196
+ }
197
+ --X
198
+ // ``exclusiveMaximum `` is exclusive, so 100 is not valid:
191
199
100
192
200
--X
193
201
// Greater than ``maximum ``:
0 commit comments