Skip to content

Commit

Permalink
Merge pull request #395 from dlax/reorganize-validation-keywords
Browse files Browse the repository at this point in the history
Reorganize validation keywords
  • Loading branch information
handrews authored Sep 7, 2017
2 parents b2760eb + 98f0a16 commit ce3403c
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions jsonschema-validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,48 @@
instance.
</t>

<section title="Validation keywords for any instance type">
<section title="type">
<t>
The value of this keyword MUST be either a string or an array. If it is
an array, elements of the array MUST be strings and MUST be unique.
</t>
<t>
String values MUST be one of the six primitive types
("null", "boolean", "object", "array", "number", or "string"),
or "integer" which matches any number with a zero fractional part.
</t>
<t>
An instance validates if and only if the instance is in any of the sets listed
for this keyword.
</t>
</section>

<section title="enum">
<t>
The value of this keyword MUST be an array. This array SHOULD have at
least one element. Elements in the array SHOULD be unique.
</t>
<t>
An instance validates successfully against this keyword if its value is
equal to one of the elements in this keyword's array value.
</t>
<t>
Elements in the array might be of any value, including null.
</t>
</section>

<section title="const">
<t>
The value of this keyword MAY be of any type, including null.
</t>
<t>
An instance validates successfully against this keyword if its value is
equal to the value of the keyword.
</t>
</section>
</section>

<section title="Validation keywords for numeric instances (number and integer)">
<section title="multipleOf">
<t>
Expand Down Expand Up @@ -593,48 +635,6 @@
</section>
</section>

<section title="Validation keywords for any instance type">
<section title="enum">
<t>
The value of this keyword MUST be an array. This array SHOULD have at
least one element. Elements in the array SHOULD be unique.
</t>
<t>
An instance validates successfully against this keyword if its value is
equal to one of the elements in this keyword's array value.
</t>
<t>
Elements in the array might be of any value, including null.
</t>
</section>

<section title="const">
<t>
The value of this keyword MAY be of any type, including null.
</t>
<t>
An instance validates successfully against this keyword if its value is
equal to the value of the keyword.
</t>
</section>

<section title="type">
<t>
The value of this keyword MUST be either a string or an array. If it is
an array, elements of the array MUST be strings and MUST be unique.
</t>
<t>
String values MUST be one of the six primitive types
("null", "boolean", "object", "array", "number", or "string"),
or "integer" which matches any number with a zero fractional part.
</t>
<t>
An instance validates if and only if the instance is in any of the sets listed
for this keyword.
</t>
</section>
</section>

<section title="Keywords for applying subschemas with boolean logic">
<section title="allOf">
<t>
Expand Down

0 comments on commit ce3403c

Please sign in to comment.