Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwaggerUI Plug ignores Phoenix Endpoint url configuration #546

Open
ycherniavskyi opened this issue Jun 18, 2023 · 0 comments · May be fixed by #547
Open

SwaggerUI Plug ignores Phoenix Endpoint url configuration #546

ycherniavskyi opened this issue Jun 18, 2023 · 0 comments · May be fixed by #547

Comments

@ycherniavskyi
Copy link
Contributor

Consider the following router configuration:

scope "/" do
  pipe_through :browser

  get "/swagger-ui", OpenApiSpex.Plug.SwaggerUI, path: "/api/openapi"
end

scope "/api" do
  pipe_through :api

  get "/openapi", OpenApiSpex.Plug.RenderSpec, []
end

This works perfectly until a non-empty value is provided for the path parameter in the Phoenix.Endpoint configuration url parameter. Once a non-empty path is provided, the SwaggerUI plug substitutes the incorrect path in the generated HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant