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
{
}
FieldDescription

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
{
}
FieldDescription

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
{
}
FieldDescription

ScalarPropertyType extends PropertyType

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

BooleanPropertyType extends ScalarPropertyType

Represents a boolean value
{
}
FieldDescription

GenericPropertyType extends PropertyType

Represents a generic value which can be replaced with a dynamic type
{
  "name": String,
}
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.

IntegerPropertyType extends ScalarPropertyType

Represents an integer value
{
}
FieldDescription

MapDefinitionType extends CollectionDefinitionType

Represents a map which contains a dynamic set of key value entries of the same type
{
}
FieldDescription

MapPropertyType extends CollectionPropertyType

Represents a map which contains a dynamic set of key value entries of the same type
{
}
FieldDescription

NumberPropertyType extends ScalarPropertyType

Represents a float value
{
}
FieldDescription

ReferencePropertyType extends PropertyType

Represents a reference to a definition type
{
  "target": String,
  "template": Map (String),
}
FieldDescription
targetString
The target type, this must be a key which is available under the definitions keyword.
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.

StringPropertyType extends ScalarPropertyType

Represents a string value
{
  "format": String,
}
FieldDescription
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 fall back to a string.

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),
}
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 and the value the actual discriminator type value.
parentReferencePropertyType
Defines a parent type for this structure. Some programming languages like Go do not support the concept of an extends, in this case the code generator simply copies all properties into this structure.
propertiesMap (PropertyType)
Contains a map of available properties for this struct.

TypeSchema

TypeSchema specification
{
  "definitions": Map (DefinitionType),
  "import": Map (String),
  "root": String,
}
FieldDescription
definitionsMap (DefinitionType)
importMap (String)
Through the import keyword it is possible 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.