View Source JsonSchema.Parser.UnionParser (json_schema v0.4.0)
Parses a JSON schema union type:
{
"type": ["number", "integer", "null"]
}
Into an JsonSchema.Types.UnionType
.
Link to this section Summary
Functions
Parses a JSON schema union type into an JsonSchema.Types.UnionType
.
Returns true if the json subschema represents a union type.
Link to this section Functions
Parses a JSON schema union type into an JsonSchema.Types.UnionType
.
@spec type?(JsonSchema.Types.schemaNode()) :: boolean()
Returns true if the json subschema represents a union type.
examples
Examples
iex> type?(%{}) false
iex> type?(%{"type" => ["number", "integer", "string"]}) true