Upgrading fastapi 0.161 to 0.162
Breaking0.161.1 → 0.162.0Breaking2Changed1Other1
BreakingUpgrade verdict
2 breaking changes.
In plain terms
- 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.
Must act 2 items need code or config changes
What you must change
Breaking2
Omitted bool and bool | None form fields now use declared defaults or raise missing-field errors instead of inferring False.
boolbool | NoneRestores default handling for omitted boolean form fields.