open_api_spex v1.1.4 OpenApiSpex.Plug.Cast View Source
Module plug that will cast the Conn.params
according to the schemas defined for the operation.
The operation_id can be given at compile time as an argument to init
:
plug OpenApiSpex.Plug.Cast, operation_id: "MyApp.ShowUser"
For phoenix applications, the operation_id can be obtained at runtime automatically.
defmodule MyAppWeb.UserController do
use Phoenix.Controller
plug OpenApiSpex.Plug.Cast
...
end