-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
At the moment we have multiple ways of using pydantic and tagged unions:
scanspecusing pydantic dataclasses and a decorator to make a tagged union of subclasses, it requires positional argsFastCSusing plain dataclasses and a pydantic BaseModel creation function to do serialization and deserializationpviuses an explicitly created union of BaseModelsibekuses automatically created Entity BaseModels from EntityModel instancesblueapidoes something with BaseModels too, but I can't remember what
With the advent of pydantic v3, now would be a good time to look at investigating a common approach for all these usecases. Standardising on BaseModel instances would probably give us the most tool support for things like documenting models in sphinx, FastAPI and GraphQL support, and downstream serialization
@GDYendell @gilesknap @DiamondJoseph @tpoliaw @abbiemery FYI
@hyperrealist I'm hoping you'll take this on at some point in the new year
hyperrealist
Metadata
Metadata
Assignees
Labels
No labels