File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -81,12 +81,11 @@ async def lifespan(app: FastAPI):
8181 if settings .swagger_ui_endpoint :
8282 assert (
8383 settings .openapi_spec_endpoint
84- ), "openapi_spec_endpoint must be set when using swagger_ui_url "
84+ ), "openapi_spec_endpoint must be set when using swagger_ui_endpoint "
8585 app .add_route (
8686 settings .swagger_ui_endpoint ,
8787 SwaggerUI (
8888 openapi_url = settings .openapi_spec_endpoint ,
89- title = settings .swagger_ui_title ,
9089 init_oauth = settings .swagger_ui_init_oauth ,
9190 ).route ,
9291 include_in_schema = False ,
Original file line number Diff line number Diff line change @@ -46,12 +46,10 @@ class Settings(BaseSettings):
4646 enable_compression : bool = True
4747
4848 # OpenAPI / Swagger UI
49- openapi_spec_endpoint : Optional [str ] = Field (
50- pattern = _PREFIX_PATTERN , default = "/api"
51- )
49+ openapi_spec_endpoint : Optional [str ] = Field (pattern = _PREFIX_PATTERN , default = None )
5250 openapi_auth_scheme_name : str = "oidcAuth"
5351 openapi_auth_scheme_override : Optional [dict ] = None
54- swagger_ui_endpoint : Optional [str ] = "/api.html"
52+ swagger_ui_endpoint : Optional [str ] = None
5553 swagger_ui_init_oauth : dict = Field (default_factory = dict )
5654
5755 # Auth
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def test_no_openapi_spec_endpoint(source_api_server: str):
1515 app = app_factory (
1616 upstream_url = source_api_server ,
1717 openapi_spec_endpoint = None ,
18- swagger_ui_url = None ,
18+ swagger_ui_endpoint = None ,
1919 )
2020 client = TestClient (app )
2121 response = client .get ("/api" )
You can’t perform that action at this time.
0 commit comments