json_schema v0.1.0 JsonSchema.Types.EnumType View Source
Represents a custom ‘enum’ type definition in a JSON schema.
JSON Schema:
"color": {
"type": "string",
"enum": ["none", "green", "orange", "blue", "yellow", "red"]
}
Resulting Elixir intermediate representation:
%EnumType{name: "color",
path: ["#", "color"],
type: "string",
values: ["none", "green", "orange",
"blue", "yellow", "red"]}
Link to this section Summary
Link to this section Types
Link to this type
t()
View Source
t() :: %JsonSchema.Types.EnumType{ name: String.t(), path: JsonSchema.TypePath.t(), type: String.t(), values: [String.t() | number()] }