# `JsonSchema.Types.EnumType`
[🔗](https://github.com/dragonwasrobot/json_schema/blob/0.6.0/lib/types/enum_type.ex#L1)

Represents a custom `enum` type definition in a JSON schema.

JSON Schema:

    "color": {
      "description": "A set of colors",
      "default": "green",
      "type": "string",
      "enum": ["none", "green", "orange", "blue", "yellow", "red"]
    }

Resulting in the Elixir representation:

    %EnumType{name: "color",
              description: "A set of colors",
              "default": "green",
              path: URI.parse("#/color"),
              type: "string",
              values: ["none", "green", "orange",
                       "blue", "yellow", "red"]}

# `t`

```elixir
@type t() :: %JsonSchema.Types.EnumType{
  default: value_type() | nil,
  description: String.t() | nil,
  name: String.t() | :anonymous,
  path: URI.t(),
  type: value_type_name() | nil,
  values: [value_type()]
}
```

# `value_type`

```elixir
@type value_type() :: String.t() | number() | integer()
```

# `value_type_name`

```elixir
@type value_type_name() :: :integer | :number | :string
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
