rusackas opened a new pull request, #41300: URL: https://github.com/apache/superset/pull/41300
### SUMMARY `FAB_API_SWAGGER_UI` was hardcoded to `True` in the base configuration, so Flask-AppBuilder registered the interactive Swagger UI and OpenAPI spec endpoints (e.g. `/swagger/v1`) by default in every deployment that inherits the base config. This makes the documentation surface opt-in: `FAB_API_SWAGGER_UI` is now driven by the `SUPERSET_ENABLE_SWAGGER_UI` environment variable and defaults to off. The bundled Docker development environment sets `SUPERSET_ENABLE_SWAGGER_UI=true`, so local development behavior is unchanged; production deployments are documentation-off by default and can opt in via the env var or by overriding `FAB_API_SWAGGER_UI` in `superset_config.py`. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — configuration default change. ### TESTING INSTRUCTIONS Unit test added in `tests/unit_tests/config_swagger_ui_test.py` asserting the env-driven default (off when unset, on when `SUPERSET_ENABLE_SWAGGER_UI=true`). Run: `pytest tests/unit_tests/config_swagger_ui_test.py` Manual: with the env var unset, `/swagger/v1` is not registered; with `SUPERSET_ENABLE_SWAGGER_UI=true` it is. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API > Note: this changes a default (Swagger UI off by default); documented in `UPDATING.md`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
