Feature request
Context
This works:
class ClassicMemberItem(Model):
id2: str = Field(default_factory=lambda: 'm1id')
m1 = ClassicMemberItem() # id=ObjectId('6a13e2017c4eef33beb24616') id2='m1id'
This does not work:
from typing import Annotated
class ClassicMemberItem2(Model):
id2: Annotated[str, Field(default_factory=lambda: 'm2id')]
m2 = ClassicMemberItem2() # ValidationError: 1 validation error for ClassicMemberItem2
However, typing.annotated is supported by Pydantic.
Feature request
Context
This works:
This does not work:
However,
typing.annotatedis supported by Pydantic.