FastAPI has published release 0.156.0, a small but focused bug-fix release. The headline change addresses a subtle but important behavior: Pydantic Field() attributes are now preserved when Field() is used inside request parameters. The fix was submitted as PR #16547 by @tiangolo, FastAPI's creator and maintainer, and is the single change highlighted in this release.
The concrete changes in this version:
- Preserve Pydantic
Field()attributes in request parameters, so metadata supplied throughField()is no longer dropped in that context. This is the core fix in0.156.0. - Landed via PR #16547, authored by @tiangolo. The release notes list this as the sole fix under the 🐛 Fixes heading.
- The release is a patch-level bump from the prior
0.155.xline, meaning it is intended as a low-risk upgrade rather than a set of new features.
For developers, Field() is a common way to attach validation and documentation metadata to parameters declared in path operations, so losing those attributes could lead to unexpected behavior or mismatches between your code and the generated OpenAPI schema. With 0.156.0, attributes set through Field() in request parameters are preserved, which should make parameter definitions behave more predictably and keep your Pydantic-based validation intent intact. Since this is a patch release centered on a single fix, upgrading with pip install --upgrade fastapi is a straightforward step for teams relying on Field() in their endpoint signatures. Review your path operations that use Field() in parameters and confirm their behavior after the bump.
Source: https://github.com/fastapi/fastapi/releases/tag/0.156.0