Files
superset2/tests/unit_tests/openapi/__init__.py
Claude Code b53a6e0b11 fix(swagger): support URL prefix via APPLICATION_ROOT in OpenAPI and Swagger UI
Adopts #34407 by @rsbhatti. Serves the OpenAPI spec and an APPLICATION_ROOT-aware
Swagger UI for Superset deployments behind a URL prefix (reverse proxy), gated by
a new FAB_API_SWAGGER_UI_SUPERSET_APP_ROOT flag (default False).

Adoption cleanups over the original:
- keep the existing FAB_API_SWAGGER_UI flag (the original removed it)
- drop an unrelated AUTH_ROLE_PUBLIC change that the original accidentally included
- add ASF license headers and type hints to the new openapi module
- fix the SupsersetSwaggerView -> SupersetSwaggerView class-name typo
- add a unit test for the schema-name resolver

Closes #34407
Fixes #33304

Co-authored-by: rsbhatti <rajvindrasinghbhatti12@gmail.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 09:46:50 -07:00

17 lines
785 B
Python

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.