json_schema v0.3.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

Returns true if the json subschema represents a tuple type.

Link to this section Functions

Link to this function

parse(schema_node, parent_id, id, path, name)

View Source

Parses a JSON schema array type into an JsonSchema.Types.TupleType.

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