json_schema v0.2.0 JsonSchema.Types.AllOfType View Source
Represents a custom allOf
type definition in a JSON schema.
JSON Schema:
The following example schema has the path "#/definitions/fancyCircle"
{
"allOf": [
{
"type": "object",
"properties": {
"color": {
"$ref": "#/definitions/color"
},
"description": {
"type": "string"
}
},
"required": [ "color" ]
},
{
"$ref": "#/definitions/circle"
}
]
}
where "#/definitions/color"
resolves to:
{
"type": "string",
"enum": ["red", "yellow", "green"]
}
and "#/definitions/circle"
resolves to:
{
"type": "object",
"properties": {
"radius": {
"type": "number"
}
},
"required": [ "radius" ]
}
Resulting in the Elixir representation:
%AllOfType{name: "fancyCircle",
path: URI.parse("#/definitions/fancyCircle"),
types: [URI.parse("#/definitions/fancyCircle/allOf/0"),
URI.parse("#/definitions/fancyCircle/allOf/1")]}