diff --git a/lib/phoenix_swagger/plug/swaggerui.ex b/lib/phoenix_swagger/plug/swaggerui.ex index 7356039..6b63288 100644 --- a/lib/phoenix_swagger/plug/swaggerui.ex +++ b/lib/phoenix_swagger/plug/swaggerui.ex @@ -168,7 +168,8 @@ defmodule PhoenixSwagger.Plug.SwaggerUI do def init(opts) do app = Keyword.fetch!(opts, :otp_app) swagger_file = Keyword.fetch!(opts, :swagger_file) - body = EEx.eval_string(@template, spec_url: swagger_file) + template = Keyword.get(opts, :template, @template) + body = EEx.eval_string(template, spec_url: swagger_file) swagger_file_path = Path.join(["priv", "static", swagger_file]) [app: app, body: body, spec_url: swagger_file, swagger_file_path: swagger_file_path] end diff --git a/mix.exs b/mix.exs index 485aa04..7e332df 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule PhoenixSwagger.Mixfile do use Mix.Project - @version "0.8.1" + @version "0.8.2" def project do [