Parsed documentation:
Defines a Phoenix router.

The router provides a set of macros for generating routes
that dispatch to specific controllers and actions. Those
macros are named after HTTP verbs. For example:

    defmodule MyApp.Router do
      use Phoenix.Router

      get "/pages/:page", PageController, :show

The `get/3` macro above accepts a request of format "/pages/VALUE" and
dispatches it to the show action in the `PageController`.

Phoenix's router is extremely efficient, as it relies on Elixir
pattern matching for matching routes and serving requests.

### Helpers

Phoenix automatically generates a module `Helpers` inside your router
which contains named helpers to help developers generate and keep
their routes up to date.

Helpers are automatically generated based on the controller name.
For example, the route:

    get "/pages/:page", PageController, :show

will generate a named helper:

    MyApp.Router.Helpers.page_path(:show, "hello")

    MyApp.Router.Helpers.page_path(:show, "hello", some: "query")

The named helper can also be customized with the `:as` option. Given
the route:

    get "/pages/:page", PageController, :show, as: :special_page

the named helper will be:

    MyApp.Router.Helpers.special_page_path(:show, "hello")

### Scopes and Resources

The router also supports scoping of routes:

    scope "/api/v1", as: :api_v1 do
      get "/pages/:id", PageController, :show

For example, the route above will match on the path `"/api/v1/pages/:id"
and the named route will be `api_v1_page_path`, as expected from the
values given to `scope/2` option.

Phoenix also provides a `resources/4` macro that allows developers
to generate "RESTful" routes to a given resource:

    defmodule MyApp.Router do
      use Phoenix.Router

      pipe_through :browser

      resources "/pages", PageController, only: [:show]
      resources "/users", UserController, except: [:destroy]

Finally, Phoenix ships with a `mix phoenix.routes` task that nicely
formats all routes in a given router. We can use it to verify all
routes included in the router above:

    $ mix phoenix.routes
    page_path  GET    /pages/:id
    user_path  GET    /users           UserController.index/2
    user_path  GET    /users/:id/edit  UserController.edit/2
    user_path  GET    /users/new
    user_path  GET    /users/:id
    user_path  POST   /users           UserController.create/2
    user_path  PATCH  /users/:id       UserController.update/2
               PUT    /users/:id       UserController.update/2

One can also pass a router explicitly as an argument to the task:

    $ mix phoenix.routes MyApp.Router

Check `scope/2` and `resources/4` for more information.

## Pipelines and plugs

Once a request arrives to the Phoenix router, it performs
a series of transformations through pipelines until the
request is dispatched to a desired end-point.

Such transformations are defined via plugs, as defined
in the [Plug]( specification.
Once a pipeline is defined, it can be piped through per scope.

For example:

    defmodule MyApp.Router do
      use Phoenix.Router

      pipeline :browser do
        plug :fetch_session
        plug :accepts, ~w(html json)

      scope "/" do
        pipe_through :browser

        # browser related routes and resources

`Phoenix.Router` imports functions from both `Plug.Conn` and `Phoenix.Controller`
to help define plugs. In the example above, `fetch_session/2`
comes from `Plug.Conn` while `accepts/2` comes from `Phoenix.Controller`.

Note that router pipelines are only invoked after a route is found.
No plug is invoked in case no matches were found.
No suggestions.
Please help! Open an issue on GitHub if this assessment is incorrect.