Skip to content

Unable to access swagger API after enabling prefix routing #33304

@irodriguez-nebustream

Description

@irodriguez-nebustream

Bug description

I'm having an issue with accessing the /api/v1/_openapi endpoint. It looks like it redirects to /api/v1/_openapi but it should be going to /prefix/api/v1/_openapi it would be nice to expose the swagger config so we can do something like this.

OPENAPI_SWAGGER_UI_CONFIG = {
    "url": "/prefix/api/v1/_openapi"
} 

Not sure if anyone else has seen this issue or is able to replicate it.

To replicate the issue just set

SUPERSET_APP_ROOT = "/prefix"

then attempt to go to /prefix/swagger/v1

Screenshots/recordings

Image

Superset version

master / latest-dev

Python version

3.10

Node version

I don't know

Browser

Chrome

Additional context

This was done via docker image

FROM apache/superset:GHA-dev-14737083364

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiRelated to the REST APIgood first issueGood first issues for new contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions