Skip to content

SwaggerUI Plug ignores Phoenix Endpoint url configuration #546

Open
@ycherniavskyi

Description

@ycherniavskyi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions