apache/superset

Unable to access swagger API after enabling prefix routing

Closed

#33.304 aberto em 30 de abr. de 2025

Ver no GitHub
 (5 comments) (0 reactions) (0 assignees)TypeScript (17.291 forks)batch import
apigood first issue

Métricas do repositório

Stars
 (72.837 stars)
Métricas de merge de PR
 (Mesclagem média 31d 15h) (773 fundiu PRs em 30d)

Description

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.

Guia do colaborador