FastAPI 0.160.0

0.160.0
Changed 4
  • Query, header, cookie, and form parameter models now apply their extra configuration to all submitted fields in the same parameter location, consistent with Pydantic behavior, including fields declared in other models, individual parameters, or dependencies behavior changed · inferred, marked in the notes below
  • With extra="forbid", fields outside the model are rejected even if another parameter declares them
  • With extra="allow", fields outside the model are included as model extras
  • With the default extra="ignore", fields outside the model are ignored

1 change to check, marked in the notes below

From FastAPI

Query, header, cookie, and form parameter models now apply their extra configuration to all submitted fields in the same parameter location, consistent with Pydantic behavior. This includes fields declared in other models, individual parameters, or dependencies, which were previously excluded.

With extra="forbid", fields outside the model are rejected even if another parameter declares them. With extra="allow", those fields are included as model extras. With the default extra="ignore", they are ignored. behavior changed · inferred

Breaking Changes
  • 🐛 Apply each parameter model's extra configuration to sibling fields. PR #16594 by @tiangolo.
Internal
View original

Upgraded? How did it go?

Discussion