JsonSchema.Parser.ArrayParser (json_schema v0.6.0)

Copy Markdown View Source

Parses a JSON schema array type:

{
  "type": "array",
  "items": {
    "$ref": "#/definitions/rectangle"
  }
}

Into an JsonSchema.Types.ArrayType.

Summary

Functions

Returns true if the json subschema represents an array type.

Functions

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

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

type?(arg1)

@spec type?(JsonSchema.Types.schemaNode()) :: boolean()

Returns true if the json subschema represents an array type.

Examples

iex> type?(%{}) false

iex> type?(%{"items" => %{"$ref" => "#foo"}}) true