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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

`PhoenixApiDocs` is a library written in the `Elixir` for the [Phoenix framework](http://www.phoenixframework.org/). It lets you generate API documentation in the [API Blueprint](https://apiblueprint.org/) format from annotations in controllers and automated tests.

`Only` available for Phoenix v1.3, this is a patch for this case. I hope the author will update the library

## Installation

Add PhoenixApiDocs to your mix.exs dependencies:

```elixir
defp deps do
[{:phoenix_api_docs, "~> 0.1.0"}]
[{:phoenix_api_docs, git: "git@github.com:luismackmack/phoenix_api_docs.git", branch: "master"}]
end
```

Expand Down
4 changes: 2 additions & 2 deletions lib/phoenix_api_docs/generator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ 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])
app_module = Mix.Project.get.application |> Keyword.get(:mod) |> elem(0) |> Module.split |> List.first
router_module = Module.concat([app_module, :Web, :Router])

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