Releases · fastapi/fastapi · GitHub
Skip to content

Releases: fastapi/fastapi

0.162.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 18:47
7a0a3f0

Omitted bool and bool | None form fields now use their declared defaults or produce missing-field errors, consistent with other fields and Pydantic behavior. FastAPI no longer infers False for omitted booleans. This applies to individual form parameters, form models, and unions of form models.

Omitted boolean model fields are excluded from model_dump(exclude_unset=True), and their defaults no longer count as submitted fields during union selection. Default factories and validate_default follow the usual rules.

For HTML checkboxes, declare a boolean with a default of False. See Boolean Form Fields.

Breaking Changes

  • 🐛 Restore default handling for omitted boolean form fields. PR #16605 by @tiangolo.

0.161.1

Choose a tag to compare

@github-actions github-actions released this 22 Oct 22:21
69ddc2b

Fixes

  • 🐛 Fix OpenAPI schemas for standalone nullable form unions. PR #16598 by @tiangolo.

0.161.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 18:30
80c8742

Features

  • ✨ Add support for combining unions of form models. PR #16596 by @tiangolo.

0.160.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 16:54
addd077

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.

Breaking Changes

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

Internal

0.159.1

Choose a tag to compare

@github-actions github-actions released this 21 Oct 20:59
4bdfbe4

Features

  • ✨ Add support for optional unions of form models. PR #16586 by @tiangolo.

0.159.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 20:03
68cc4cb

Features

  • ✨ Add support for optional query, header, and cookie parameter models. PR #16584 by @tiangolo.

0.158.2

Choose a tag to compare

@github-actions github-actions released this 21 Oct 19:20
e4c5d02

Features

0.158.1

Choose a tag to compare

@github-actions github-actions released this 21 Oct 17:47
ed39e8b

Fixes

0.158.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 17:01
3c0103a

Features

0.157.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 13:55
386a28a

Features

  • ✨ Add support for combining query, header, and cookie parameter models. PR #16573 by @tiangolo.

Docs

  • 📝 Clarify boolean query parameter parsing. PR #16569 by @tiangolo.
  • 📝 Clarify nullable query parameters and path parameter defaults. PR #16568 by @tiangolo.

Internal

  • 👷 Remove translation notifications and approval labeling. PR #16570 by @tiangolo.