connexion
connexion copied to clipboard
Starlette deprecation warning when accessing SwaggerUI page
When I access to the swagger page of my application, there is a deprecation warning:
.../venv/lib/python3.11/site-packages/starlette/templating.py:161: DeprecationWarning: The `name` is not the first parameter anymore. The first parameter should be the `Request` instance. Replace `TemplateResponse(name, {"request": request})` by `TemplateResponse(request, name)`. warnings.warn(
It comes from: https://github.com/spec-first/connexion/blob/a930303faa9e10603cdd820c497303b2e52d8253/connexion/middleware/swagger_ui.py#L174
Additional info:
Output of the commands:
-
python --version: 3.11 -
pip show connexion | grep "^Version\:"3.1.0