View Source JsonSchema.Types.EnumType (json_schema v0.4.0)
Represents a custom enum
type definition in a JSON schema.
JSON Schema:
"color": {
"description": "A set of colors",
"type": "string",
"enum": ["none", "green", "orange", "blue", "yellow", "red"]
}
Resulting in the Elixir representation:
%EnumType{name: "color",
description: "A set of colors",
path: URI.parse("#/color"),
type: "string",
values: ["none", "green", "orange",
"blue", "yellow", "red"]}
Link to this section Summary
Link to this section Types
@type value_type() :: :integer | :number | :string