feat: update root model defs
This commit is contained in:
@@ -55,7 +55,8 @@ class Dog(BaseModel):
|
||||
barks: float
|
||||
|
||||
|
||||
Animal = RootModel[Annotated[Union[Cat, Dog], Field(discriminator='pet_type')]]
|
||||
class Animal(RootModel):
|
||||
root: Annotated[Union[Cat, Dog], Field(discriminator='pet_type')]
|
||||
|
||||
|
||||
class PetCollectionView(PydanticView):
|
||||
|
||||
Reference in New Issue
Block a user