json_schema v0.3.0 JsonSchema.Types.ConstType View Source
Represents a custom const
type definition in a JSON schema.
JSON Schema:
"favoriteNumber": { "type": "integer", "const": 42 }
or
"testStruct": { "const": {
"name": "Test",
"foo": 43
} }
Resulting in the Elixir representation:
%ConstType{name: "favoriteNumber",
description: nil,
type: "number",
path: URI.parse("#/favoriteNumber"),
const: 42}
or
%ConstType{name: "testStruct",
description: nil,
type: "object",
path: URI.parse("#/testStruct"),
const: %{"name" => "Test", "foo" => 43}}