PhoenixApiToolkit.GenericRequestValidator.query_order_by
You're seeing just the function
query_order_by
, go back to PhoenixApiToolkit.GenericRequestValidator module for more information.
Specs
query_order_by(map() | Ecto.Changeset.t() | schema(), map(), Enum.t()) :: Ecto.Changeset.t()
Validates the order_by
query parameter of an index endpoint.
Examples
iex> resource_schema() |> query_order_by(%{"order_by" => "asc:last_name"}, ~w(last_name) |> MapSet.new())
#Ecto.Changeset<action: nil, changes: %{order_by: [asc: :last_name]}, errors: [], data: %{}, valid?: true>
See PhoenixApiToolkit.Ecto.Validators.validate_order_by/2
for more examples.