connexion icon indicating copy to clipboard operation
connexion copied to clipboard

Starlette deprecation warning when accessing SwaggerUI page

Open nmoreaud opened this issue 1 year ago • 0 comments

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

nmoreaud avatar Oct 15 '24 09:10 nmoreaud