You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation for Integration with FastAPI example is still using Pydantic v1. FastAPI with Pydantic v2 support was released back in Aug 2023. Since Pydantic v2 introduces a number of API changes as discussed in the Pydantic migration guide, it would be ideal to reflect this in the documentation.
Documentation for Integration with FastAPI example is still using Pydantic v1. FastAPI with Pydantic v2 support was released back in Aug 2023. Since Pydantic v2 introduces a number of API changes as discussed in the Pydantic migration guide, it would be ideal to reflect this in the documentation.
Specifically:
orm_mode
is deprecated and replaced byfrom_attributes
. ref: https://docs.pydantic.dev/dev/migration/#changes-to-pydanticbasemodelvalidator
is deprecated: ref: https://docs.pydantic.dev/dev/migration/#validator-and-root_validator-are-deprecatedFastAPI with Pydantic v2 fastapi/fastapi#9709
Hence the Schema example can be updated from:
to
The text was updated successfully, but these errors were encountered: