...
- type – The entered value must be string or an array. If an array type is entered, its elements must be strings and should be unique. Values of the string type must be one of the listed primitive types: “null”, ‘boolean”, “array”, “number”, or “string”. Values that are integers are validated when they match any number with a zero fractional part.
- enum – The entered value of this keyword must be an array with at least one element. All listed elements should be unique and can be of any type (including “null”). Successful validation is done when the entered value is matched to one of the array values belonging to the enum keyword.
- const – The entered value of this keyword must be in an array with at least one element. If more than one element is present, they should all be uniquely named. All array element types can be used, including “null”. Successful validation is done when the entered value is matched to one of the values belonging to the const keyword.
Specific rules are defined for the following JSON types:
- tuple – Tuple refers to a set of objects which are ordered together and immutable. They cannot be changed and operate the same manner as “string” data types. Validation is performed for the whole array of items placed inside the tuple instance.
- oneOf – oneOf validation is used to compare data between items exactly as shown in the current schema configuration.
- nestedObject – Nested objects are complex structures that includes a “parent” JSON object that has “child” properties attached to it. Validation is performed on the whole iteration.
- reference – A reference keyword is a valid instance that points to a given location, that is indicated by the referenced value.
Validation keywords for Numeric Instance Types
...