From 6172ad7fc0c592f39af2ee03392e313e29d36bf0 Mon Sep 17 00:00:00 2001 From: Luis Angel Date: Thu, 27 Jul 2017 15:57:11 -0400 Subject: [PATCH 1/2] patch dependency for Phoenix v1.3 --- README.md | 1 + lib/phoenix_api_docs/generator.ex | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 98ddc3d..107ec31 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 ## Installation 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"), From 86839925dd0dd1398d49b94a8edc18ae775422c2 Mon Sep 17 00:00:00 2001 From: Luis Angel Date: Thu, 27 Jul 2017 17:25:09 -0400 Subject: [PATCH 2/2] modify Readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 107ec31..520bf31 100644 --- a/README.md +++ b/README.md @@ -2,7 +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 +`Only` available for Phoenix v1.3, this is a patch for this case. I hope the author will update the library ## Installation @@ -10,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 ```