diff --git a/README.md b/README.md index 98ddc3d..520bf31 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ `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 @@ -9,7 +10,7 @@ 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 ``` diff --git a/lib/phoenix_api_docs/generator.ex b/lib/phoenix_api_docs/generator.ex index c0224e9..88ca6b0 100644 --- a/lib/phoenix_api_docs/generator.ex +++ b/lib/phoenix_api_docs/generator.ex @@ -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"),