PhoenixSwagger.Schema.pattern
You're seeing just the function
pattern
, go back to PhoenixSwagger.Schema module for more information.
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}$"}