PropertyType

Base property type
{
  "deprecated": Boolean,
  "description": String,
  "nullable": Boolean,
  "type": String,
}
FieldDescription
deprecatedBoolean
descriptionString
nullableBoolean
typeString

AnyPropertyType extends PropertyType

Represents an any value which allows any kind of value
{
  "type": String = "any",
}
FieldDescription
typeString

DefinitionType

Base definition type
{
  "deprecated": Boolean,
  "description": String,
  "type": String,
}
FieldDescription
deprecatedBoolean
descriptionString
typeString

CollectionDefinitionType extends DefinitionType

Base collection type
{
  "schema": PropertyType,
  "type": String,
}
FieldDescription
schemaPropertyType
typeString

ArrayDefinitionType extends CollectionDefinitionType

Represents an array which contains a dynamic list of values of the same type
{
  "type": String = "array",
}
FieldDescription
typeString

CollectionPropertyType extends PropertyType

Base collection property type
{
  "schema": PropertyType,
  "type": String,
}
FieldDescription
schemaPropertyType
typeString

ArrayPropertyType extends CollectionPropertyType

Represents an array which contains a dynamic list of values of the same type
{
  "type": String = "array",
}
FieldDescription
typeString

ScalarPropertyType extends PropertyType

Base scalar property type
{
  "type": String,
}
FieldDescription
typeString

BooleanPropertyType extends ScalarPropertyType

Represents a boolean value
{
  "type": String = "boolean",
}
FieldDescription
typeString

GenericPropertyType extends PropertyType

Represents a generic value which can be replaced with a concrete type
{
  "name": String,
  "type": String = "generic",
}
FieldDescription
nameString
The name of the generic, it is recommended to use common generic names like T or TValue. These generics can then be replaced on usage with a concrete type through the template property at a reference
typeString

IntegerPropertyType extends ScalarPropertyType

Represents an integer value
{
  "type": String = "integer",
}
FieldDescription
typeString

MapDefinitionType extends CollectionDefinitionType

Represents a map which contains a dynamic set of key value entries of the same type
{
  "type": String = "map",
}
FieldDescription
typeString

MapPropertyType extends CollectionPropertyType

Represents a map which contains a dynamic set of key value entries of the same type
{
  "type": String = "map",
}
FieldDescription
typeString

NumberPropertyType extends ScalarPropertyType

Represents a float value
{
  "type": String = "number",
}
FieldDescription
typeString

ReferencePropertyType extends PropertyType

Represents a reference to a definition type
{
  "target": String,
  "template": Map (String),
  "type": String = "reference",
}
FieldDescription
targetString
The target type, this must be a key which is available at the definitions map
templateMap (String)
A map where the key is the name of the generic and the value must point to a key under the definitions keyword. This can be used in case the target points to a type which contains generics, then it is possible to replace those generics with a concrete type
typeString

StringPropertyType extends ScalarPropertyType

Represents a string value
{
  "default": String,
  "format": String,
  "type": String = "string",
}
FieldDescription
defaultString
Optional a default value for this property
formatString
Optional describes the format of the string. Supported are the following types: date, date-time and time. A code generator may use a fitting data type to represent such a format, if not supported it should fallback to a string
typeString

StructDefinitionType extends DefinitionType

A struct represents a class/structure with a fix set of defined properties
{
  "base": Boolean,
  "discriminator": String,
  "mapping": Map (String),
  "parent": ReferencePropertyType,
  "properties": Map (PropertyType),
  "type": String = "struct",
}
FieldDescription
baseBoolean
Indicates whether this is a base structure, default is false. If true the structure is used a base type, this means it is not possible to create an instance from this structure
discriminatorString
Optional the property name of a discriminator property. This should be only used in case this is also a base structure
mappingMap (String)
In case a discriminator is configured it is required to configure a mapping. The mapping is a map where the key is the type name (a key from the definitions map) and the value the actual discriminator type value
parentReferencePropertyType
Defines a parent type, all properties from the parent type are inherited
propertiesMap (PropertyType)
Contains a map of available properties for this struct
typeString

TypeSchema

TypeSchema specification
{
  "definitions": Map (DefinitionType),
  "import": Map (String),
  "root": String,
}
FieldDescription
definitionsMap (DefinitionType)
importMap (String)
Allows to import other TypeSchema documents. It contains a map where the key is the namespace and the value points to a remote document. The value is a URL and a code generator should support at least the following schemes: file, http, https
rootString
Specifies the root type of your specification, this must be a key which is available at the definitions map