json_schema v0.1.0 JsonSchema.Parser.DefinitionsParser View Source

Parses a ‘definitions’ property in a JSON schema or subschema.

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://example.com/root.json",
  "definitions": {
    "foo": { ... },
    "bar": { ... }
  }
}

Into a type dictionary.

Link to this section Summary

Functions

Parses a JSON schema ‘definitions’ property into a map of types

Returns true if the json schema contains a ‘definitions’ property

Link to this section Functions

Link to this function parse(map, parent_id, id, path, name) View Source

Parses a JSON schema ‘definitions’ property into a map of types.

Returns true if the json schema contains a ‘definitions’ property.

Examples

iex> type?(%{“title” => “A fancy title”}) false

iex> type?(%{“definitions” => %{}}) true