Skip to content

Upgrading fastapi 0.161 to 0.162

Breaking0.161.1 → 0.162.0Breaking2Changed1Other1

BreakingUpgrade verdict

2 breaking changes.

  • If a boolean form field is left out of a request, FastAPI no longer assumes it was false. It now uses the default you declared, or reports the field as missing, just like other field types.
  • Boolean form fields that are left out of a request now follow their declared defaults instead of being treated as false.
2 items need code or config changes
Breaking2
Omitted bool and bool | None form fields now use declared defaults or raise missing-field errors instead of inferring False.
boolbool | None
Restores default handling for omitted boolean form fields.