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

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