PhoenixSwagger.Schema.pattern

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

pattern(model, regex_pattern)

View Source

Restricts a string schema to match a regular expression, given as a string.

Examples

iex> alias PhoenixSwagger.Schema
...> %Schema{type: :string}
...> |> Schema.pattern(~S"^(([0-9]{2}))?[0-9]{4}-[0-9]{4}$")
%PhoenixSwagger.Schema{type: :string, pattern: ~S"^(([0-9]{2}))?[0-9]{4}-[0-9]{4}$"}