Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,14 @@ The configuration options can be setup in `config.exs`:
```elixir
config :phoenix_api_docs,
docs_path: "priv/static/docs",
theme: "triple"
theme: "triple",
router: YourApp.Web.Router
```

Config options:
* `docs_path`: Specify the path where the documentation will be generated. If you want to serve the documentation directly from the `phoenix` you can specify `priv/static/docs`.
* `theme`: HTML theme is generated using the [Aglio renderer](https://github.com/danielgtaylor/aglio).
* `router`: Router of your application, in Phoenix 1.3 it will be YourAppName.Web.Router


## Common problems
Expand Down
2 changes: 1 addition & 1 deletion lib/phoenix_api_docs/generator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule PhoenixApiDocs.Generator do
def run do
test_conns = PhoenixApiDocs.ConnLogger.conns
app_module = Mix.Project.get.application |> Keyword.get(:mod) |> elem(0)
router_module = Module.concat([app_module, :Router])
router_module = Application.get_env(:phoenix_api_docs, :router, Module.concat([app_module, :Router]))

%{
host: Keyword.get(api_docs_info, :host, "http://localhost"),
Expand Down