json_schema v0.1.0 JsonSchema.Parser.TupleParser View Source
Parses a JSON schema array type:
{
"type": "array",
"items": [
{ "$ref": "#/rectangle" },
{ "$ref": "#/circle" }
]
}
Into a JsonSchema.Types.TupleType
.
Link to this section Summary
Functions
Parses a JSON schema array type into an JsonSchema.Types.TupleType
Returns true if the json subschema represents a tuple type
Link to this section Functions
Link to this function
parse(map, parent_id, id, path, name)
View Source
parse( JsonSchema.Types.schemaNode(), URI.t(), URI.t() | nil, JsonSchema.TypePath.t(), String.t() ) :: JsonSchema.Parser.ParserResult.t()
Parses a JSON schema array type into an JsonSchema.Types.TupleType
.
Link to this function
type?(schema_node)
View Source
type?(JsonSchema.Types.schemaNode()) :: boolean()
Returns true if the json subschema represents a tuple type.
Examples
iex> type?(%{}) false
iex> aTuple = %{“items” => [%{“$ref” => “#foo”}, %{“$ref” => “#bar”}]} iex> type?(aTuple) true