From b7b63e8888be547a406e064409f8126d2414a7e1 Mon Sep 17 00:00:00 2001 From: Leonardo Pessoa Date: Thu, 18 Oct 2018 00:43:03 -0300 Subject: [PATCH 1/2] Allows to customize the swagger display page --- lib/phoenix_swagger/plug/swaggerui.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 From d2e4f886cb410fdfd2ae5a1f0e9c41e7b8198103 Mon Sep 17 00:00:00 2001 From: Leonardo Pessoa Date: Thu, 18 Oct 2018 00:46:15 -0300 Subject: [PATCH 2/2] Update project patch version --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 [