Can I override fields from a Pydantic parent model to make them optional?

后端 未结 0 355
死守一世寂寞
死守一世寂寞 2021-01-25 18:41

I have two pydantic classes like this.

class Parent(BaseModel):
    id: int
    name: str
    email: str

class ParentUpdate(BaseModel):
    id: Optional[int]
            


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题