mongodb-labs/full-stack-fastapi-mongodb

Models are out of date with the new pydantic modeling paradigm from pydantic 2.0

Closed this issue · 2 comments

Seems like this is still using the old implementation of Config for pydantic. For example:

class RefreshToken(RefreshTokenUpdate):
    class Config:
        from_attributes = True

Should now be re-written as:

from pydantic import ConfigDict

class RefreshToken(RefreshTokenUpdate):

    model_config = ConfigDict(from_attributes=True)

I believe you should be able to use Bump Pydantic to get a lot of these things fixed with minimal work

Thanks for highlighting this issue @sammaphey.

We've gone ahead and captured this in a JIRA ticket, where you can track its' progress.

Feel free to open a PR related to the issue and we will happily review it any time.

Marking issue as "fixed" with introduction of PR: #29