Skip to main content

JSON Schema Specification

Schema Definitions

Spec Json Schema Root

Type: Object($id, $schema, title, description, type, $ref, properties, patternProperties, definitions, examples, required, additionalProperties, x-custom-typescript-types, x-property-order, x-recommended)

PropertyTypeDescription
$id
OPTIONAL
string
$schema
OPTIONAL
title
OPTIONAL
string
Descriptive title document text.
description
OPTIONAL
string
type
OPTIONAL
$ref
OPTIONAL
string
Reference to another schema.
This is used to link to other schemas or definitions within the specification document.

JSON Schema Format: uri-reference
properties
OPTIONAL
patternProperties
OPTIONAL
definitions
MANDATORY
Definitions of the specification document.
examples
OPTIONAL
Array<Example>
Examples of the property value.
This is used to provide examples of how the property can be used in practice.
required
OPTIONAL
Array<string>
Required properties of the object.
This is used to define which properties are required in the specification document.
additionalProperties
OPTIONAL
boolean
Allow additional properties in the object.
This is used to define whether additional properties are allowed in the specification document.
x-custom-typescript-types
OPTIONAL
x-property-order
OPTIONAL
Array<string>
Optionally reorder an objects properties by this list. Unlisted properties will be appended in their original order.
Array<string>
Mark properties as recommended (use like required).
Additional Properties
^x-[a-z]+(-[a-z]+)+$
OPTIONAL
string | number | boolean | array | object | nullSpec Toolkit plugin specific x- properties.
MUST start with x-<pluginName>- and can be used to extend the specification document with additional properties.

Additional properties MUST follow key name regexp pattern: ^x-[a-z]+(-[a-z]+)+$

Spec Json Schema Type Name

Name of the type used in the Spec JSON Schema. This is used to define the type of properties in the specification document.

Type: string
Allowed Values:

  • string
  • number
  • integer
  • boolean
  • object
  • array
  • null

Spec Json Schema Type Name Array

Array of type names used in the Spec JSON Schema. This is used to define multiple types for a property in the specification document.

Type: Array<Spec Json Schema Type Name>

Example

Example item used in the examples array. This is used to provide an example of how the property can be used in practice.

Type: object,string,array,boolean

Spec Json Schema Type

Primitive type. @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1

Type: string

Spec Json Schema Version

Type: string

Properties

PropertyTypeDescription
Additional Properties
^(?![@]|__|\.|::).+$
OPTIONAL
Spec Json SchemaAdditional properties MUST follow key name regexp pattern: ^(?![@]|__|\.|::).+$

Pattern Properties

PropertyTypeDescription
Additional Properties
^(?![@]|__|\.|::).+$
OPTIONAL
Spec Json SchemaAdditional properties MUST follow key name regexp pattern: ^(?![@]|__|\.|::).+$

Spec Json Schema

The main object of the Spec JSON Schema, based on JSON Schema v7. @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01

Type: Object($comment, $ref, type, enum, const, maximum, exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, items, additionalItems, maxItems, minItems, minProperties, required, properties, patternProperties, additionalProperties, if, then, else, allOf, anyOf, oneOf, format, title, description, default, examples, x-recommended, x-introduced-in-version, x-deprecated-in-version, x-deprecation-text, x-feature-status, x-pattern-properties-description, x-property-order, x-association-target, x-hide-property, x-hide-properties, x-extension-points, x-header-level, x-abstract, tsType)

PropertyTypeDescription
$comment
OPTIONAL
string
$ref
OPTIONAL
string
type
OPTIONAL
enum
OPTIONAL
const
OPTIONAL
maximum
OPTIONAL
number
exclusiveMaximum
OPTIONAL
number
minimum
OPTIONAL
number
exclusiveMinimum
OPTIONAL
number
maxLength
OPTIONAL
number
minLength
OPTIONAL
number
pattern
OPTIONAL
string
items
OPTIONAL
The main object of the Spec JSON Schema, based on JSON Schema v7.
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
additionalItems
OPTIONAL
The main object of the Spec JSON Schema, based on JSON Schema v7.
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
maxItems
OPTIONAL
number
minItems
OPTIONAL
number
minProperties
OPTIONAL
number
required
OPTIONAL
Array<string>
properties
OPTIONAL
patternProperties
OPTIONAL
additionalProperties
OPTIONAL
boolean
if
OPTIONAL
The main object of the Spec JSON Schema, based on JSON Schema v7.
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
then
OPTIONAL
The main object of the Spec JSON Schema, based on JSON Schema v7.
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
else
OPTIONAL
The main object of the Spec JSON Schema, based on JSON Schema v7.
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
allOf
OPTIONAL
anyOf
OPTIONAL
oneOf
OPTIONAL
format
OPTIONAL
string
Format of the property value.
This is used to specify the expected format of the property value, such as date-time, email, etc.
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
@see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-7.3

Allowed Values:
  • "date-time"
  • "date"
  • "time"
  • "uri"
  • "uri-reference"
  • "uri-template"
  • "iri"
  • "iri-reference"
  • "email"
  • "hostname"
  • "idn-hostname"
  • "ipv4"
  • "ipv6"
  • "json-pointer"
  • "relative-json-pointer"
  • "regex"
title
OPTIONAL
string
description
OPTIONAL
string
default
OPTIONAL
string,number,boolean
examples
OPTIONAL
Array<Example>
Examples of the property value.
This is used to provide examples of how the property can be used in practice.
Array<string>
Mark properties as recommended (use like required).
x-introduced-in-version
OPTIONAL
string
Version of the specification when this entity or property was introduced.
x-deprecated-in-version
OPTIONAL
string
Version of the specification when this entity or property was deprecated.
x-deprecation-text
OPTIONAL
string
Text to be shown in the documentation when this property is deprecated.
Use this to provide a reason for deprecation and/or a migration suggestion.
x-feature-status
OPTIONAL
string
Feature Status. Use this to mark something as alpha or beta.
Allowed Values:
  • "alpha"
  • "beta"
x-pattern-properties-description
OPTIONAL
string
Add a human readable description for the patternProperties construct
x-property-order
OPTIONAL
Array<string>
Optionally reorder an objects properties by this list. Unlisted properties will be appended in their original order.
x-association-target
OPTIONAL
Array<string>
Point to the association target entity and optionally the property which is used as its ID.
Use a $ref pointer array as values
x-hide-property
OPTIONAL
boolean
Hide property from generated documentation, but keep it in exported JSON Schema.
x-hide-properties
OPTIONAL
boolean
Hide properties table from generated documentation, but keep it in exported JSON Schema.
x-extension-points
OPTIONAL
Array<string>
Define extension points in the target document
x-header-level
OPTIONAL
number
Define the MD heading level in the target document. Default value: 3

Default Value: 3
x-abstract
OPTIONAL
boolean
Marks JSON Schema object as abstract

Entities marked as abstract will not be part of the final interface documentation
An abstract entity could indicate which properties are shared between multiple entities.
Abstract entities can be necessary for polymorphic association, e.g. for UMS model export they are mandatory.
tsType
OPTIONAL
string
Overwrite the generated TypeScript Type.

Used and defined by json-schema-to-typescript tsType.
For advanced use cases where the json-schema-to-typescript library doesn't support to define the "key" type of patternProperties. Use // replaceKeyType_ as workaround.
In the curly brackets you can combine multiple type names by the pipe/vertical bar character.

Example Values:
  • "tsType: unknown // replaceKeyType_{YourTypeNameHere}"
Additional Properties
^x-[a-z]+(-[a-z]+)+$
OPTIONAL
string | number | boolean | array | object | nullSpec Toolkit plugin specific x- properties.
MUST start with x-<pluginName>- and can be used to extend the specification document with additional properties.

Additional properties MUST follow key name regexp pattern: ^x-[a-z]+(-[a-z]+)+$

Spec Extension Json Schema

The main object of the Spec Extension JSON Schema, based on JSON Schema v7. @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01

Type: Object($comment, $ref, type, enum, const, maximum, exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, items, additionalItems, maxItems, minItems, minProperties, required, properties, patternProperties, additionalProperties, if, then, else, allOf, anyOf, oneOf, format, title, description, default, examples, x-recommended, x-introduced-in-version, x-deprecated-in-version, x-deprecation-text, x-feature-status, x-pattern-properties-description, x-property-order, x-association-target, x-hide-property, x-hide-properties, x-extension-points, x-header-level, x-abstract, tsType, x-extension-targets, x-ref-to-doc)

PropertyTypeDescription
$comment
OPTIONAL
string
$ref
OPTIONAL
string
type
OPTIONAL
enum
OPTIONAL
const
OPTIONAL
maximum
OPTIONAL
number
exclusiveMaximum
OPTIONAL
number
minimum
OPTIONAL
number
exclusiveMinimum
OPTIONAL
number
maxLength
OPTIONAL
number
minLength
OPTIONAL
number
pattern
OPTIONAL
string
items
OPTIONAL
The main object of the Spec JSON Schema, based on JSON Schema v7.
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
additionalItems
OPTIONAL
The main object of the Spec JSON Schema, based on JSON Schema v7.
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
maxItems
OPTIONAL
number
minItems
OPTIONAL
number
minProperties
OPTIONAL
number
required
OPTIONAL
Array<string>
properties
OPTIONAL
patternProperties
OPTIONAL
additionalProperties
OPTIONAL
boolean
if
OPTIONAL
The main object of the Spec JSON Schema, based on JSON Schema v7.
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
then
OPTIONAL
The main object of the Spec JSON Schema, based on JSON Schema v7.
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
else
OPTIONAL
The main object of the Spec JSON Schema, based on JSON Schema v7.
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
allOf
OPTIONAL
anyOf
OPTIONAL
oneOf
OPTIONAL
format
OPTIONAL
string
Format of the property value.
This is used to specify the expected format of the property value, such as date-time, email, etc.
@see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
@see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-7.3

Allowed Values:
  • "date-time"
  • "date"
  • "time"
  • "uri"
  • "uri-reference"
  • "uri-template"
  • "iri"
  • "iri-reference"
  • "email"
  • "hostname"
  • "idn-hostname"
  • "ipv4"
  • "ipv6"
  • "json-pointer"
  • "relative-json-pointer"
  • "regex"
title
OPTIONAL
string
description
OPTIONAL
string
default
OPTIONAL
string,number,boolean
examples
OPTIONAL
Array<Example>
Examples of the property value.
This is used to provide examples of how the property can be used in practice.
Array<string>
Mark properties as recommended (use like required).
x-introduced-in-version
OPTIONAL
string
Version of the specification when this entity or property was introduced.
x-deprecated-in-version
OPTIONAL
string
Version of the specification when this entity or property was deprecated.
x-deprecation-text
OPTIONAL
string
Text to be shown in the documentation when this property is deprecated.
Use this to provide a reason for deprecation and/or a migration suggestion.
x-feature-status
OPTIONAL
string
Feature Status. Use this to mark something as alpha or beta.
Allowed Values:
  • "alpha"
  • "beta"
x-pattern-properties-description
OPTIONAL
string
Add a human readable description for the patternProperties construct
x-property-order
OPTIONAL
Array<string>
Optionally reorder an objects properties by this list. Unlisted properties will be appended in their original order.
x-association-target
OPTIONAL
Array<string>
Point to the association target entity and optionally the property which is used as its ID.
Use a $ref pointer array as values
x-hide-property
OPTIONAL
boolean
Hide property from generated documentation, but keep it in exported JSON Schema.
x-hide-properties
OPTIONAL
boolean
Hide properties table from generated documentation, but keep it in exported JSON Schema.
x-extension-points
OPTIONAL
Array<string>
Define extension points in the target document
x-header-level
OPTIONAL
number
Define the MD heading level in the target document. Default value: 3

Default Value: 3
x-abstract
OPTIONAL
boolean
Marks JSON Schema object as abstract

Entities marked as abstract will not be part of the final interface documentation
An abstract entity could indicate which properties are shared between multiple entities.
Abstract entities can be necessary for polymorphic association, e.g. for UMS model export they are mandatory.
tsType
OPTIONAL
string
Overwrite the generated TypeScript Type.

Used and defined by json-schema-to-typescript tsType.
For advanced use cases where the json-schema-to-typescript library doesn't support to define the "key" type of patternProperties. Use // replaceKeyType_ as workaround.
In the curly brackets you can combine multiple type names by the pipe/vertical bar character.

Example Values:
  • "tsType: unknown // replaceKeyType_{YourTypeNameHere}"
x-extension-targets
OPTIONAL
Array<string>
Indicate which target document extension pointers this property is merged into
x-ref-to-doc
OPTIONAL
Reference to a document in the core spec.
This is used to link from a spec extension to a specific document in the core spec.
Additional Properties
^x-[a-z]+(-[a-z]+)+$
OPTIONAL
string | number | boolean | array | object | nullSpec Toolkit plugin specific x- properties.
MUST start with x-<pluginName>- and can be used to extend the specification document with additional properties.

Additional properties MUST follow key name regexp pattern: ^x-[a-z]+(-[a-z]+)+$

Xx Property Ref To Doc

TODO: move this to spec-extension.schema.yaml Note: This property is only relevant for spec extensions! Reference to a interface in the core spec. This is used to link from a spec extension to a specific document in the core spec.

Type: Object(title, ref)

PropertyTypeDescription
title
MANDATORY
string
Title of the referenced document.
ref
MANDATORY
string
URI reference to the referenced document.
JSON Schema Format: uri-reference

Xx Property Custom TypeScript Type

Custom TypeScript type that can be used in the document.

Type: Object(typeName, typeValue)

PropertyTypeDescription
typeName
MANDATORY
string
Name of the custom TypeScript type to be generated.
typeValue
MANDATORY
string
Value of the custom TypeScript type to be generated.

Json Schema Definitions

Definitions of the specification document.

PropertyTypeDescription
Additional Properties
^(?![@]|__|\.|::).+$
OPTIONAL
Json Schema DefinitionAdditional properties MUST follow key name regexp pattern: ^(?![@]|__|\.|::).+$

Json Schema Definition