@types/json-schema

  • Version 7.0.15
  • Published
  • 31.7 kB
  • No dependencies
  • MIT license

Install

npm i @types/json-schema
yarn add @types/json-schema
pnpm add @types/json-schema

Overview

TypeScript definitions for json-schema

Index

Functions

Interfaces

Type Aliases

Functions

function checkPropertyChange

checkPropertyChange: (
value: any,
schema: JSONSchema4 | JSONSchema6 | JSONSchema7,
property: string
) => ValidationResult;
  • The checkPropertyChange method will check to see if an value can legally be in property with the given schema This is slightly different than the validate method in that it will fail if the schema is readonly and it will not check for self-validation, it is assumed that the passed in value is already internally valid.

function mustBeValid

mustBeValid: (result: ValidationResult) => void;
  • This checks to ensure that the result is valid and will throw an appropriate error message if it is not.

function validate

validate: (
instance: {},
schema: JSONSchema4 | JSONSchema6 | JSONSchema7
) => ValidationResult;
  • To use the validator call JSONSchema.validate with an instance object and an optional schema object. If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating), that schema will be used to validate and the schema parameter is not necessary (if both exist, both validations will occur).

Interfaces

interface JSONSchema4

interface JSONSchema4 {}
  • JSON Schema V4

    See Also

    • https://tools.ietf.org/html/draft-zyp-json-schema-04

property $ref

$ref?: string | undefined;

    property $schema

    $schema?: JSONSchema4Version | undefined;

      property additionalItems

      additionalItems?: boolean | JSONSchema4 | undefined;
      • May only be defined when "items" is defined, and is a tuple of JSONSchemas.

        This provides a definition for additional items in an array instance when tuple definitions of the items is provided. This can be false to indicate additional items in the array are not allowed, or it can be a schema that defines the schema of the additional items.

        See Also

        • https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6

      property additionalProperties

      additionalProperties?: boolean | JSONSchema4 | undefined;
      • This attribute defines a schema for all properties that are not explicitly defined in an object type definition. If specified, the value MUST be a schema or a boolean. If false is provided, no additional properties are allowed beyond the properties defined in the schema. The default value is an empty schema which allows any value for additional properties.

        See Also

        • https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4

      property allOf

      allOf?: JSONSchema4[] | undefined;

        property anyOf

        anyOf?: JSONSchema4[] | undefined;

          property default

          default?: JSONSchema4Type | undefined;

            property definitions

            definitions?:
            | {
            [k: string]: JSONSchema4;
            }
            | undefined;

              property dependencies

              dependencies?:
              | {
              [k: string]: JSONSchema4 | string[];
              }
              | undefined;

                property description

                description?: string | undefined;
                • This attribute is a string that provides a full description of the of purpose the instance property.

                  See Also

                  • https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22

                property enum

                enum?: JSONSchema4Type[] | undefined;
                • This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid.

                  See Also

                  • https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19

                property exclusiveMaximum

                exclusiveMaximum?: boolean | undefined;

                  property exclusiveMinimum

                  exclusiveMinimum?: boolean | undefined;

                    property extends

                    extends?: string | string[] | undefined;
                    • The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints.

                      Conceptually, the behavior of extends can be seen as validating an instance against all constraints in the extending schema as well as the extended schema(s).

                      See Also

                      • https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26

                    property format

                    format?: string | undefined;

                      property id

                      id?: string | undefined;

                        property items

                        items?: JSONSchema4 | JSONSchema4[] | undefined;
                        • This attribute defines the allowed items in an instance array, and MUST be a schema or an array of schemas. The default value is an empty schema which allows any value for items in the instance array.

                          When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema.

                          When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST conform to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the "additionalItems" (Section 5.6) attribute using the same rules as "additionalProperties" (Section 5.4) for objects.

                          See Also

                          • https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5

                        property maximum

                        maximum?: number | undefined;

                          property maxItems

                          maxItems?: number | undefined;

                            property maxLength

                            maxLength?: number | undefined;

                              property maxProperties

                              maxProperties?: number | undefined;

                                property minimum

                                minimum?: number | undefined;

                                  property minItems

                                  minItems?: number | undefined;

                                    property minLength

                                    minLength?: number | undefined;

                                      property minProperties

                                      minProperties?: number | undefined;

                                        property multipleOf

                                        multipleOf?: number | undefined;

                                          property not

                                          not?: JSONSchema4 | undefined;

                                            property oneOf

                                            oneOf?: JSONSchema4[] | undefined;

                                              property pattern

                                              pattern?: string | undefined;

                                                property patternProperties

                                                patternProperties?:
                                                | {
                                                [k: string]: JSONSchema4;
                                                }
                                                | undefined;
                                                • This attribute is an object that defines the schema for a set of property names of an object instance. The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value.

                                                  See Also

                                                  • https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3

                                                property properties

                                                properties?:
                                                | {
                                                [k: string]: JSONSchema4;
                                                }
                                                | undefined;
                                                • This attribute is an object with property definitions that define the valid values of instance object property values. When the instance value is an object, the property values of the instance object MUST conform to the property definitions in this object. In this object, each property definition's value MUST be a schema, and the property's name MUST be the name of the instance property that it defines. The instance property value MUST be valid according to the schema from the property definition. Properties are considered unordered, the order of the instance properties MAY be in any order.

                                                  See Also

                                                  • https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2

                                                property required

                                                required?: boolean | string[] | undefined;
                                                • This attribute indicates if the instance must have a value, and not be undefined. This is false by default, making the instance optional.

                                                  See Also

                                                  • https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7

                                                property title

                                                title?: string | undefined;
                                                • This attribute is a string that provides a short description of the instance property.

                                                  See Also

                                                  • https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21

                                                property type

                                                type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
                                                • A single type, or a union of simple types

                                                property uniqueItems

                                                uniqueItems?: boolean | undefined;

                                                  index signature

                                                  [k: string]: any;
                                                  • See Also

                                                    • https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6

                                                  interface JSONSchema4Array

                                                  interface JSONSchema4Array extends Array<JSONSchema4Type> {}

                                                    interface JSONSchema4Object

                                                    interface JSONSchema4Object {}

                                                      index signature

                                                      [key: string]: JSONSchema4Type;

                                                        interface JSONSchema6

                                                        interface JSONSchema6 {}

                                                          property $id

                                                          $id?: string | undefined;

                                                            property $ref

                                                            $ref?: string | undefined;

                                                              property $schema

                                                              $schema?: JSONSchema6Version | undefined;

                                                                property additionalItems

                                                                additionalItems?: JSONSchema6Definition | undefined;
                                                                • This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself. If "items" is an array of schemas, validation succeeds if every instance element at a position greater than the size of "items" validates against "additionalItems". Otherwise, "additionalItems" MUST be ignored, as the "items" schema (possibly the default value of an empty schema) is applied to all elements. Omitting this keyword has the same behavior as an empty schema.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10

                                                                property additionalProperties

                                                                additionalProperties?: JSONSchema6Definition | undefined;
                                                                • This attribute defines a schema for all properties that are not explicitly defined in an object type definition. If specified, the value MUST be a schema or a boolean. If false is provided, no additional properties are allowed beyond the properties defined in the schema. The default value is an empty schema which allows any value for additional properties.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20

                                                                property allOf

                                                                allOf?: JSONSchema6Definition[] | undefined;
                                                                • See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26

                                                                property anyOf

                                                                anyOf?: JSONSchema6Definition[] | undefined;
                                                                • See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27

                                                                property const

                                                                const?: JSONSchema6Type | undefined;
                                                                • More readable form of a one-element "enum"

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24

                                                                property contains

                                                                contains?: JSONSchema6Definition | undefined;
                                                                • An array instance is valid against "contains" if at least one of its elements is valid against the given schema.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14

                                                                property default

                                                                default?: JSONSchema6Type | undefined;
                                                                • This keyword can be used to supply a default JSON value associated with a particular schema. It is RECOMMENDED that a default value be valid against the associated schema.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3

                                                                property definitions

                                                                definitions?:
                                                                | {
                                                                [k: string]: JSONSchema6Definition;
                                                                }
                                                                | undefined;
                                                                • See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1

                                                                property dependencies

                                                                dependencies?:
                                                                | {
                                                                [k: string]: JSONSchema6Definition | string[];
                                                                }
                                                                | undefined;
                                                                • This keyword specifies rules that are evaluated if the instance is an object and contains a certain property. Each property specifies a dependency. If the dependency value is an array, each element in the array must be unique. Omitting this keyword has the same behavior as an empty object.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21

                                                                property description

                                                                description?: string | undefined;
                                                                • This attribute is a string that provides a full description of the of purpose the instance property.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2

                                                                property enum

                                                                enum?: JSONSchema6Type[] | undefined;
                                                                • This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.23

                                                                property examples

                                                                examples?: JSONSchema6Type[] | undefined;
                                                                • Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4

                                                                property exclusiveMaximum

                                                                exclusiveMaximum?: number | undefined;
                                                                • Representing an exclusive upper limit for a numeric instance. This keyword validates only if the instance is strictly less than (not equal to) to "exclusiveMaximum".

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3

                                                                property exclusiveMinimum

                                                                exclusiveMinimum?: number | undefined;
                                                                • Representing an exclusive lower limit for a numeric instance. This keyword validates only if the instance is strictly greater than (not equal to) to "exclusiveMinimum".

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5

                                                                property format

                                                                format?: string | undefined;
                                                                • See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8

                                                                property items

                                                                items?: JSONSchema6Definition | JSONSchema6Definition[] | undefined;
                                                                • This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself. Omitting this keyword has the same behavior as an empty schema.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9

                                                                property maximum

                                                                maximum?: number | undefined;
                                                                • Representing an inclusive upper limit for a numeric instance. This keyword validates only if the instance is less than or exactly equal to "maximum".

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2

                                                                property maxItems

                                                                maxItems?: number | undefined;
                                                                • Must be a non-negative integer. An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11

                                                                property maxLength

                                                                maxLength?: number | undefined;
                                                                • Must be a non-negative integer. A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6

                                                                property maxProperties

                                                                maxProperties?: number | undefined;
                                                                • Must be a non-negative integer. An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this keyword.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15

                                                                property minimum

                                                                minimum?: number | undefined;
                                                                • Representing an inclusive lower limit for a numeric instance. This keyword validates only if the instance is greater than or exactly equal to "minimum".

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4

                                                                property minItems

                                                                minItems?: number | undefined;
                                                                • Must be a non-negative integer. An array instance is valid against "maxItems" if its size is greater than, or equal to, the value of this keyword. Omitting this keyword has the same behavior as a value of 0.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12

                                                                property minLength

                                                                minLength?: number | undefined;
                                                                • Must be a non-negative integer. A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword. Omitting this keyword has the same behavior as a value of 0.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7

                                                                property minProperties

                                                                minProperties?: number | undefined;
                                                                • Must be a non-negative integer. An object instance is valid against "maxProperties" if its number of properties is greater than, or equal to, the value of this keyword. Omitting this keyword has the same behavior as a value of 0.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16

                                                                property multipleOf

                                                                multipleOf?: number | undefined;
                                                                • Must be strictly greater than 0. A numeric instance is valid only if division by this keyword's value results in an integer.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1

                                                                property not

                                                                not?: JSONSchema6Definition | undefined;
                                                                • See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29

                                                                property oneOf

                                                                oneOf?: JSONSchema6Definition[] | undefined;
                                                                • See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28

                                                                property pattern

                                                                pattern?: string | undefined;
                                                                • Should be a valid regular expression, according to the ECMA 262 regular expression dialect.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8

                                                                property patternProperties

                                                                patternProperties?:
                                                                | {
                                                                [k: string]: JSONSchema6Definition;
                                                                }
                                                                | undefined;
                                                                • This attribute is an object that defines the schema for a set of property names of an object instance. The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema. If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value. Omitting this keyword has the same behavior as an empty object.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19

                                                                property properties

                                                                properties?:
                                                                | {
                                                                [k: string]: JSONSchema6Definition;
                                                                }
                                                                | undefined;
                                                                • This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself. Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value, the child instance for that name successfully validates against the corresponding schema. Omitting this keyword has the same behavior as an empty object.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18

                                                                property propertyNames

                                                                propertyNames?: JSONSchema6Definition | undefined;
                                                                • Takes a schema which validates the names of all properties rather than their values. Note the property name that the schema is testing will always be a string. Omitting this keyword has the same behavior as an empty schema.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22

                                                                property required

                                                                required?: string[] | undefined;
                                                                • Elements of this array must be unique. An object instance is valid against this keyword if every item in the array is the name of a property in the instance. Omitting this keyword has the same behavior as an empty array.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17

                                                                property title

                                                                title?: string | undefined;
                                                                • This attribute is a string that provides a short description of the instance property.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2

                                                                property type

                                                                type?: JSONSchema6TypeName | JSONSchema6TypeName[] | undefined;
                                                                • A single type, or a union of simple types

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25

                                                                property uniqueItems

                                                                uniqueItems?: boolean | undefined;
                                                                • If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique. Omitting this keyword has the same behavior as a value of false.

                                                                  See Also

                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13

                                                                interface JSONSchema6Array

                                                                interface JSONSchema6Array extends Array<JSONSchema6Type> {}

                                                                  interface JSONSchema6Object

                                                                  interface JSONSchema6Object {}

                                                                    index signature

                                                                    [key: string]: JSONSchema6Type;

                                                                      interface JSONSchema7

                                                                      interface JSONSchema7 {}

                                                                        property $comment

                                                                        $comment?: string | undefined;

                                                                          property $defs

                                                                          $defs?:
                                                                          | {
                                                                          [key: string]: JSONSchema7Definition;
                                                                          }
                                                                          | undefined;
                                                                          • See Also

                                                                            • https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4

                                                                            • https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A

                                                                          property $id

                                                                          $id?: string | undefined;

                                                                            property $ref

                                                                            $ref?: string | undefined;

                                                                              property $schema

                                                                              $schema?: JSONSchema7Version | undefined;

                                                                                property additionalItems

                                                                                additionalItems?: JSONSchema7Definition | undefined;

                                                                                  property additionalProperties

                                                                                  additionalProperties?: JSONSchema7Definition | undefined;

                                                                                    property allOf

                                                                                    allOf?: JSONSchema7Definition[] | undefined;
                                                                                    • See Also

                                                                                      • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7

                                                                                    property anyOf

                                                                                    anyOf?: JSONSchema7Definition[] | undefined;

                                                                                      property const

                                                                                      const?: JSONSchema7Type | undefined;

                                                                                        property contains

                                                                                        contains?: JSONSchema7Definition | undefined;

                                                                                          property contentEncoding

                                                                                          contentEncoding?: string | undefined;

                                                                                            property contentMediaType

                                                                                            contentMediaType?: string | undefined;
                                                                                            • See Also

                                                                                              • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8

                                                                                            property default

                                                                                            default?: JSONSchema7Type | undefined;

                                                                                              property definitions

                                                                                              definitions?:
                                                                                              | {
                                                                                              [key: string]: JSONSchema7Definition;
                                                                                              }
                                                                                              | undefined;
                                                                                              • See Also

                                                                                                • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9

                                                                                              property dependencies

                                                                                              dependencies?:
                                                                                              | {
                                                                                              [key: string]: JSONSchema7Definition | string[];
                                                                                              }
                                                                                              | undefined;

                                                                                                property description

                                                                                                description?: string | undefined;

                                                                                                  property else

                                                                                                  else?: JSONSchema7Definition | undefined;

                                                                                                    property enum

                                                                                                    enum?: JSONSchema7Type[] | undefined;

                                                                                                      property examples

                                                                                                      examples?: JSONSchema7Type | undefined;

                                                                                                        property exclusiveMaximum

                                                                                                        exclusiveMaximum?: number | undefined;

                                                                                                          property exclusiveMinimum

                                                                                                          exclusiveMinimum?: number | undefined;

                                                                                                            property format

                                                                                                            format?: string | undefined;
                                                                                                            • See Also

                                                                                                              • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7

                                                                                                            property if

                                                                                                            if?: JSONSchema7Definition | undefined;
                                                                                                            • See Also

                                                                                                              • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6

                                                                                                            property items

                                                                                                            items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;
                                                                                                            • See Also

                                                                                                              • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4

                                                                                                            property maximum

                                                                                                            maximum?: number | undefined;

                                                                                                              property maxItems

                                                                                                              maxItems?: number | undefined;

                                                                                                                property maxLength

                                                                                                                maxLength?: number | undefined;
                                                                                                                • See Also

                                                                                                                  • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3

                                                                                                                property maxProperties

                                                                                                                maxProperties?: number | undefined;
                                                                                                                • See Also

                                                                                                                  • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5

                                                                                                                property minimum

                                                                                                                minimum?: number | undefined;

                                                                                                                  property minItems

                                                                                                                  minItems?: number | undefined;

                                                                                                                    property minLength

                                                                                                                    minLength?: number | undefined;

                                                                                                                      property minProperties

                                                                                                                      minProperties?: number | undefined;

                                                                                                                        property multipleOf

                                                                                                                        multipleOf?: number | undefined;
                                                                                                                        • See Also

                                                                                                                          • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2

                                                                                                                        property not

                                                                                                                        not?: JSONSchema7Definition | undefined;

                                                                                                                          property oneOf

                                                                                                                          oneOf?: JSONSchema7Definition[] | undefined;

                                                                                                                            property pattern

                                                                                                                            pattern?: string | undefined;

                                                                                                                              property patternProperties

                                                                                                                              patternProperties?:
                                                                                                                              | {
                                                                                                                              [key: string]: JSONSchema7Definition;
                                                                                                                              }
                                                                                                                              | undefined;

                                                                                                                                property properties

                                                                                                                                properties?:
                                                                                                                                | {
                                                                                                                                [key: string]: JSONSchema7Definition;
                                                                                                                                }
                                                                                                                                | undefined;

                                                                                                                                  property propertyNames

                                                                                                                                  propertyNames?: JSONSchema7Definition | undefined;

                                                                                                                                    property readOnly

                                                                                                                                    readOnly?: boolean | undefined;

                                                                                                                                      property required

                                                                                                                                      required?: string[] | undefined;

                                                                                                                                        property then

                                                                                                                                        then?: JSONSchema7Definition | undefined;

                                                                                                                                          property title

                                                                                                                                          title?: string | undefined;
                                                                                                                                          • See Also

                                                                                                                                            • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10

                                                                                                                                          property type

                                                                                                                                          type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
                                                                                                                                          • See Also

                                                                                                                                            • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1

                                                                                                                                          property uniqueItems

                                                                                                                                          uniqueItems?: boolean | undefined;

                                                                                                                                            property writeOnly

                                                                                                                                            writeOnly?: boolean | undefined;

                                                                                                                                              interface JSONSchema7Array

                                                                                                                                              interface JSONSchema7Array extends Array<JSONSchema7Type> {}

                                                                                                                                                interface JSONSchema7Object

                                                                                                                                                interface JSONSchema7Object {}

                                                                                                                                                  index signature

                                                                                                                                                  [key: string]: JSONSchema7Type;

                                                                                                                                                    interface ValidationError

                                                                                                                                                    interface ValidationError {}

                                                                                                                                                      property message

                                                                                                                                                      message: string;

                                                                                                                                                        property property

                                                                                                                                                        property: string;

                                                                                                                                                          interface ValidationResult

                                                                                                                                                          interface ValidationResult {}

                                                                                                                                                            property errors

                                                                                                                                                            errors: ValidationError[];

                                                                                                                                                              property valid

                                                                                                                                                              valid: boolean;

                                                                                                                                                                Type Aliases

                                                                                                                                                                type JSONSchema4Type

                                                                                                                                                                type JSONSchema4Type =
                                                                                                                                                                | string //
                                                                                                                                                                | number
                                                                                                                                                                | boolean
                                                                                                                                                                | JSONSchema4Object
                                                                                                                                                                | JSONSchema4Array
                                                                                                                                                                | null;
                                                                                                                                                                • See Also

                                                                                                                                                                  • https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5

                                                                                                                                                                type JSONSchema4TypeName

                                                                                                                                                                type JSONSchema4TypeName =
                                                                                                                                                                | 'string' //
                                                                                                                                                                | 'number'
                                                                                                                                                                | 'integer'
                                                                                                                                                                | 'boolean'
                                                                                                                                                                | 'object'
                                                                                                                                                                | 'array'
                                                                                                                                                                | 'null'
                                                                                                                                                                | 'any';
                                                                                                                                                                • See Also

                                                                                                                                                                  • https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1

                                                                                                                                                                type JSONSchema4Version

                                                                                                                                                                type JSONSchema4Version = string;
                                                                                                                                                                • Meta schema

                                                                                                                                                                  Recommended values: - 'http://json-schema.org/schema#' - 'http://json-schema.org/hyper-schema#' - 'http://json-schema.org/draft-04/schema#' - 'http://json-schema.org/draft-04/hyper-schema#' - 'http://json-schema.org/draft-03/schema#' - 'http://json-schema.org/draft-03/hyper-schema#'

                                                                                                                                                                  See Also

                                                                                                                                                                  • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5

                                                                                                                                                                type JSONSchema6Definition

                                                                                                                                                                type JSONSchema6Definition = JSONSchema6 | boolean;
                                                                                                                                                                • JSON Schema V6

                                                                                                                                                                  See Also

                                                                                                                                                                  • https://tools.ietf.org/html/draft-wright-json-schema-validation-01

                                                                                                                                                                type JSONSchema6Type

                                                                                                                                                                type JSONSchema6Type =
                                                                                                                                                                | string //
                                                                                                                                                                | number
                                                                                                                                                                | boolean
                                                                                                                                                                | JSONSchema6Object
                                                                                                                                                                | JSONSchema6Array
                                                                                                                                                                | null;

                                                                                                                                                                  type JSONSchema6TypeName

                                                                                                                                                                  type JSONSchema6TypeName =
                                                                                                                                                                  | 'string' //
                                                                                                                                                                  | 'number'
                                                                                                                                                                  | 'integer'
                                                                                                                                                                  | 'boolean'
                                                                                                                                                                  | 'object'
                                                                                                                                                                  | 'array'
                                                                                                                                                                  | 'null'
                                                                                                                                                                  | 'any';

                                                                                                                                                                    type JSONSchema6Version

                                                                                                                                                                    type JSONSchema6Version = string;
                                                                                                                                                                    • Meta schema

                                                                                                                                                                      Recommended values: - 'http://json-schema.org/schema#' - 'http://json-schema.org/hyper-schema#' - 'http://json-schema.org/draft-06/schema#' - 'http://json-schema.org/draft-06/hyper-schema#'

                                                                                                                                                                      See Also

                                                                                                                                                                      • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5

                                                                                                                                                                    type JSONSchema7Definition

                                                                                                                                                                    type JSONSchema7Definition = JSONSchema7 | boolean;
                                                                                                                                                                    • JSON Schema v7

                                                                                                                                                                      See Also

                                                                                                                                                                      • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01

                                                                                                                                                                    type JSONSchema7Type

                                                                                                                                                                    type JSONSchema7Type =
                                                                                                                                                                    | string //
                                                                                                                                                                    | number
                                                                                                                                                                    | boolean
                                                                                                                                                                    | JSONSchema7Object
                                                                                                                                                                    | JSONSchema7Array
                                                                                                                                                                    | null;
                                                                                                                                                                    • Primitive type

                                                                                                                                                                      See Also

                                                                                                                                                                      • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1

                                                                                                                                                                    type JSONSchema7TypeName

                                                                                                                                                                    type JSONSchema7TypeName =
                                                                                                                                                                    | 'string' //
                                                                                                                                                                    | 'number'
                                                                                                                                                                    | 'integer'
                                                                                                                                                                    | 'boolean'
                                                                                                                                                                    | 'object'
                                                                                                                                                                    | 'array'
                                                                                                                                                                    | 'null';
                                                                                                                                                                    • Primitive type

                                                                                                                                                                      See Also

                                                                                                                                                                      • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1

                                                                                                                                                                    type JSONSchema7Version

                                                                                                                                                                    type JSONSchema7Version = string;
                                                                                                                                                                    • Meta schema

                                                                                                                                                                      Recommended values: - 'http://json-schema.org/schema#' - 'http://json-schema.org/hyper-schema#' - 'http://json-schema.org/draft-07/schema#' - 'http://json-schema.org/draft-07/hyper-schema#'

                                                                                                                                                                      See Also

                                                                                                                                                                      • https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5

                                                                                                                                                                    Package Files (1)

                                                                                                                                                                    Dependencies (0)

                                                                                                                                                                    No dependencies.

                                                                                                                                                                    Dev Dependencies (0)

                                                                                                                                                                    No dev dependencies.

                                                                                                                                                                    Peer Dependencies (0)

                                                                                                                                                                    No peer dependencies.

                                                                                                                                                                    Badge

                                                                                                                                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/json-schema.

                                                                                                                                                                    • Markdown
                                                                                                                                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/json-schema)
                                                                                                                                                                    • HTML
                                                                                                                                                                      <a href="https://www.jsdocs.io/package/@types/json-schema"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>