PhoenixSwagger.Schema.default

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

Sets the default value for the schema.

The value provided should validate against the schema sucessfully.

Examples

iex> alias PhoenixSwagger.Schema
...> %Schema{type: :string, format: :datetime}
...> |> Schema.default("2017-01-01T00:00:00Z")
%PhoenixSwagger.Schema{
  type: :string,
  format: :datetime,
  default: "2017-01-01T00:00:00Z"
}