Skip to content

Commit ce3403c

Browse files
authored
Merge pull request json-schema-org#395 from dlax/reorganize-validation-keywords
Reorganize validation keywords
2 parents b2760eb + 98f0a16 commit ce3403c

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

jsonschema-validation.xml

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,48 @@
251251
instance.
252252
</t>
253253

254+
<section title="Validation keywords for any instance type">
255+
<section title="type">
256+
<t>
257+
The value of this keyword MUST be either a string or an array. If it is
258+
an array, elements of the array MUST be strings and MUST be unique.
259+
</t>
260+
<t>
261+
String values MUST be one of the six primitive types
262+
("null", "boolean", "object", "array", "number", or "string"),
263+
or "integer" which matches any number with a zero fractional part.
264+
</t>
265+
<t>
266+
An instance validates if and only if the instance is in any of the sets listed
267+
for this keyword.
268+
</t>
269+
</section>
270+
271+
<section title="enum">
272+
<t>
273+
The value of this keyword MUST be an array. This array SHOULD have at
274+
least one element. Elements in the array SHOULD be unique.
275+
</t>
276+
<t>
277+
An instance validates successfully against this keyword if its value is
278+
equal to one of the elements in this keyword's array value.
279+
</t>
280+
<t>
281+
Elements in the array might be of any value, including null.
282+
</t>
283+
</section>
284+
285+
<section title="const">
286+
<t>
287+
The value of this keyword MAY be of any type, including null.
288+
</t>
289+
<t>
290+
An instance validates successfully against this keyword if its value is
291+
equal to the value of the keyword.
292+
</t>
293+
</section>
294+
</section>
295+
254296
<section title="Validation keywords for numeric instances (number and integer)">
255297
<section title="multipleOf">
256298
<t>
@@ -593,48 +635,6 @@
593635
</section>
594636
</section>
595637

596-
<section title="Validation keywords for any instance type">
597-
<section title="enum">
598-
<t>
599-
The value of this keyword MUST be an array. This array SHOULD have at
600-
least one element. Elements in the array SHOULD be unique.
601-
</t>
602-
<t>
603-
An instance validates successfully against this keyword if its value is
604-
equal to one of the elements in this keyword's array value.
605-
</t>
606-
<t>
607-
Elements in the array might be of any value, including null.
608-
</t>
609-
</section>
610-
611-
<section title="const">
612-
<t>
613-
The value of this keyword MAY be of any type, including null.
614-
</t>
615-
<t>
616-
An instance validates successfully against this keyword if its value is
617-
equal to the value of the keyword.
618-
</t>
619-
</section>
620-
621-
<section title="type">
622-
<t>
623-
The value of this keyword MUST be either a string or an array. If it is
624-
an array, elements of the array MUST be strings and MUST be unique.
625-
</t>
626-
<t>
627-
String values MUST be one of the six primitive types
628-
("null", "boolean", "object", "array", "number", or "string"),
629-
or "integer" which matches any number with a zero fractional part.
630-
</t>
631-
<t>
632-
An instance validates if and only if the instance is in any of the sets listed
633-
for this keyword.
634-
</t>
635-
</section>
636-
</section>
637-
638638
<section title="Keywords for applying subschemas with boolean logic">
639639
<section title="allOf">
640640
<t>

0 commit comments

Comments
 (0)