json_schema v0.1.0 JsonSchema.Types.TypeReference View Source
Represents a reference to a custom type definition in a JSON schema.
JSON Schema:
"self": {
"$ref": "#/definitions/foo"
}
"other": {
"$ref": "http://www.example.com/definitions.json#bar"
}
Where “#/definitions/foo” resolves to
"definitions": {
"foo": {
"type": "string"
}
}
and “http://www.example.com/definitions.json#bar” resolves to
"definitions": {
"bar": {
"id": "#bar",
"type": "number"
}
}
Resulting Elixir intermediate representation:
%TypeReference{name: "self",
path: ["#", "definitions", "foo"]}
%TypeReference{name: "other",
path: %URI{scheme: "http",
host: "www.example.com",
path: "/definitions.json",
fragment: "bar",
...}}
Link to this section Summary
Link to this section Types
Link to this type
t()
View Source
t() :: %JsonSchema.Types.TypeReference{ name: String.t(), path: JsonSchema.Types.typeIdentifier() }
Link to this section Functions
Link to this function
new(name, path)
View Source
new(String.t(), JsonSchema.Types.typeIdentifier()) :: t()