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 lib/phoenix_swagger/plug/swaggerui.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good. Please update the Options section of the doc string to include 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
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule PhoenixSwagger.Mixfile do
use Mix.Project

@version "0.8.1"
@version "0.8.2"

def project do
[
Expand Down