Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starlette deprecation warning when accessing SwaggerUI page #1980

Closed
nmoreaud opened this issue Oct 15, 2024 · 1 comment
Closed

Starlette deprecation warning when accessing SwaggerUI page #1980

nmoreaud opened this issue Oct 15, 2024 · 1 comment

Comments

@nmoreaud
Copy link

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:

return self._templates.TemplateResponse("index.j2", template_variables)

Additional info:

Output of the commands:

  • python --version: 3.11
  • pip show connexion | grep "^Version\:" 3.1.0
@nmoreaud nmoreaud changed the title Starlette deprecation warning Starlette deprecation warning when accessing SwaggerUI page Oct 15, 2024
@RobbeSneyders
Copy link
Member

Fixed by #1976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants