PhoenixSwagger.Schema.enum

You're seeing just the function enum, go back to PhoenixSwagger.Schema module for more information.

Restricts the schema to a fixed set of values.

Examples

iex> alias PhoenixSwagger.Schema
...> %Schema{type: :string}
...> |> Schema.enum(["red", "yellow", "green"])
%PhoenixSwagger.Schema{type: :string, enum: ["red", "yellow", "green"]}