Using Pydantic's MISSING sentinel in FastAPI for PATCH endpoints
Starting with Pydantic 2.12.0, the MISSING sentinel can be used to annotate non-required, non-nullable fields, which is very useful for PATCH endpoints.
Starting with Pydantic 2.12.0, the MISSING sentinel can be used to annotate non-required, non-nullable fields, which is very useful for PATCH endpoints.
This article goes through a quick example of how to use TypedDict in FastAPI for the body of a PATCH endpoint.