fastapi/fastapi/dependencies
Sharon Yogev fdf66c825e
🐛 Fix using `Annotated` in routers or path operations decorated multiple times (#9315)
* Fix: copy FieldInfo from Annotated arguments

We need to copy the field_info to prevent ourselves from
mutating it.  This allows multiple path or nested routers ,etc.

* 📝 Add comment in fastapi/dependencies/utils.py

Co-authored-by: Nadav Zingerman <7372858+nzig@users.noreply.github.com>

*  Extend and tweak tests for Annotated

*  Tweak coverage, it's probably covered by a different version of Python

---------

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Nadav Zingerman <7372858+nzig@users.noreply.github.com>
2023-04-13 10:49:22 -07:00
..
__init__.py ♻️ Refactor, fix and update code 2018-12-06 20:24:50 +04:00
models.py Improve type annotations, add support for mypy --strict, internally and for external packages (#2547) 2020-12-20 19:50:00 +01:00
utils.py 🐛 Fix using `Annotated` in routers or path operations decorated multiple times (#9315) 2023-04-13 10:49:22 -07:00