131 Commits (b189030589f26759f6aa8f3056e4da9728a64780)

Author SHA1 Message Date
pre-commit-ci[bot] b189030589 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks 9 months ago
Sebastián Ramírez ac438b9934
Add support for dependencies with scopes, support `scope="request"` for dependencies with `yield` that exit before the response is sent (#14262) 9 months ago
Motov Yurii 496de1816a
🐛 Fix security schemes in OpenAPI when added at the top level app (#14266) 9 months ago
Sebastián Ramírez dcfb8b9dda
♻️ Reduce internal cyclic recursion in dependencies, from 2 functions calling each other to 1 calling itself (#14256) 9 months ago
Sebastián Ramírez bb88a0f94a
♻️ Refactor internals of dependencies, simplify code and remove `get_param_sub_dependant` (#14255) 9 months ago
Sebastián Ramírez c144f9fbd3
♻️ Refactor internals of dependencies, simplify using dataclasses (#14254) 9 months ago
Sofie Van Landeghem d8c691f7f0
🐛 Fix internal Pydantic v1 compatibility (warnings) for Python 3.14 and Pydantic 2.12.1 (#14186) 9 months ago
Sebastián Ramírez d34918abf0
Add support for `from pydantic.v1 import BaseModel`, mixed Pydantic v1 and v2 models in the same app (#14168) 9 months ago
Thomas LÉVEIL 44fc67632b
🐛 Fix validation error when `File` is declared after `Form` parameter (#11194) 10 months ago
Robert Hofer b51ec36f2e
Allow `None` as return type for bodiless responses (#9425) 10 months ago
Evgeny Bokshitsky c2c6049b8f
♻️ Create `dependency-cache` dict in `solve_dependencies` only if `None` (don't re-create if empty) (#13689) 10 months ago
rmawatson 9ac56c70f2
🐛 Reenable `allow_arbitrary_types` when only 1 argument is used on the API endpoint (#13694) 10 months ago
secrett2633 c831cdbde2
🐛 Fix `inspect.getcoroutinefunction()` can break testing with `unittest.mock.patch()` (#14022) 10 months ago
Patrick Arminio 9d0d8828cc
🐛 Fix support for unions when using `Form` (#13827) 1 year ago
Sebastián Ramírez 2537d9d1c2
🐛 Fix `convert_underscores=False` for header Pydantic models (#13515) 1 year ago
dependabot[bot] 8c94e97c89
⬆ Bump ruff to 0.9.4 (#13299) 1 year ago
Sebastián Ramírez 74fe89bf35
🐛 Add docs examples and tests (support) for `Annotated` custom validations, like `AfterValidator`, revert #13440 (#13442) 1 year ago
Victorien 15dd2b67d3
♻️ Update internal annotation usage for compatibilty with Pydantic 2.11 (#13314) 1 year ago
Nir Schulman 8a5c3fe56b Fixed more linting 2 years ago
pre-commit-ci[bot] f9ca77e1ec 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks 2 years ago
Nir Schulman 01e9da1ca2 Added coverage 2 years ago
Nir Schulman d512b03bd3 Applied ruff linting 2 years ago
Nir Schulman c4860bfb7c Added tests for dependency overrides and websockets. Fixed bugs related to the deprecated startup and shutdown events. Fixed bugs related to dependency duplcatation within the same router scope. Made more specific dependency related exceptions. Fixed some linting and mypy related issues. 2 years ago
Sebastián Ramírez b31cbbf5f5
♻️ Update logic to import and check `python-multipart` for compatibility with newer version (#12627) 2 years ago
pre-commit-ci[bot] 54ecfb87d8 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks 2 years ago
Nir Schulman 25407d039a Added support for lifespan-scoped dependencies using a new dependency_scope argument. 2 years ago
José Pacheco 8ae4603d68
🐛 Remove `Required` shadowing from fastapi using Pydantic v2 (#12197) 2 years ago
Sebastián Ramírez 40490abaa3
♻️ Update type annotations for improved `python-multipart` (#12407) 2 years ago
Sebastián Ramírez 55035f440b
Add support for Pydantic models for parameters using `Query`, `Cookie`, `Header` (#12199) 2 years ago
Nico Tonnhofer 88d4f2cb18
🐛 Fix form field regression (#12194) 2 years ago
Sebastián Ramírez b0eedbb580
️ Improve performance in request body parsing with a cache for internal model fields (#12184) 2 years ago
Sebastián Ramírez 4633b1bca9
Add support for forbidding extra form fields with Pydantic models (#12134) 2 years ago
Sebastián Ramírez 7bad7c0975
Add support for Pydantic models in `Form` parameters (#12129) 2 years ago
Sebastián Ramírez 8e6cf9ee9c
️ Temporarily revert " Add support for Pydantic models in `Form` parameters" to make a checkpoint release (#12128) 2 years ago
Sebastián Ramírez 0f3e65b007
Add support for Pydantic models in `Form` parameters (#12127) 2 years ago
Sebastián Ramírez aa21814a89
♻️ Refactor deciding if `embed` body fields, do not overwrite fields, compute once per router, refactor internals in preparation for Pydantic models in `Form`, `Query` and others (#12117) 2 years ago
Sebastián Ramírez 23bda0ffeb
♻️ Refactor internal `check_file_field()`, rename to `ensure_multipart_is_installed()` to clarify its purpose (#12106) 2 years ago
Sebastián Ramírez d08b95ea57
♻️ Rename internal `create_response_field()` to `create_model_field()` as it's used for more than response models (#12103) 2 years ago
Sebastián Ramírez 5b7fa3900e
♻️ Refactor and simplify internal data from `solve_dependencies()` using dataclasses (#12100) 2 years ago
Sebastián Ramírez 08547e1d57
♻️ Refactor and simplify internal `analyze_param()` to structure data with dataclasses instead of tuple (#12099) 2 years ago
Sebastián Ramírez 581aacc4a9
♻️ Refactor and simplify dependencies data structures with dataclasses (#12098) 2 years ago
Sebastián Ramírez 3a3ad5d66d
⬆️ Upgrade version of Ruff and reformat (#12032) 2 years ago
Nadav Zingerman eec612ca8d
🐛 Fix parameterless `Depends()` with generics (#9479) 2 years ago
Charlie Marsh 5ccc869fee
⬆️ Upgrade configuration for Ruff v0.2.0 (#11075) 2 years ago
Sebastián Ramírez a4aa79e0b4
Add support for raising exceptions (including `HTTPException`) in dependencies with `yield` in the exit code, do not support them in background tasks (#10831) 3 years ago
Sebastián Ramírez 6f5aa81c07
Add support for multiple Annotated annotations, e.g. `Annotated[str, Field(), Query()]` (#10773) 3 years ago
Sebastián Ramírez 05ca41cfd1
Add reference (code API) docs with PEP 727, add subclass with custom docstrings for `BackgroundTasks`, refactor docs structure (#10392) 3 years ago
Sebastián Ramírez 0976185af9
Add support for Pydantic v2 (#9816) 3 years ago
Sharon Yogev fdf66c825e
🐛 Fix using `Annotated` in routers or path operations decorated multiple times (#9315) 3 years ago
Nadav Zingerman 375513f114
Add support for PEP-593 `Annotated` for specifying dependencies and parameters (#4871) 3 years ago