Phoenix API Versions v1.1.0 PhoenixApiVersions.Plug View Source
A plug to be used in the controller macro in a Phoenix application’s Web module. (The file containing this module is typically called web.ex)
Required for installation of the PhoenixApiVersions library.
Example
# In web.ex
def controller do
quote do
# ...
plug PhoenixApiVersions.Plug # <----- Add this
# ...
end
end
Link to this section Summary
Functions
Finds the API Version and saves the changes that need applied into the conn
Link to this section Functions
Finds the API Version and saves the changes that need applied into the conn.
If an API Version isn’t found, routes to the “version not found” handler.