phoenix_swagger v0.7.0 PhoenixSwagger.Plug.SwaggerUI
Swagger UI in a plug
Usage:
Generate a swagger file and place it in your applications priv/static
dir:
mix phoenix.swagger.generate priv/static/myapp.json
Add a swagger scope to your router, and forward all requests to SwaggerUI
scope "myapp/api/swagger" do
forward "/", PhoenixSwagger.Plug.SwaggerUI, otp_app: :myapp, swagger_file: "myapp.json"
end
Run the server with mix phoenix.server
and browse to localhost:8080/myapp/api/swagger/
,
swagger-ui should be shown with your swagger spec loaded.