v2.0b3: Discriminator on union of models in RootModel yields TypeError
v2.0b3: Discriminator on union of models in RootModel yields TypeError: a task in harbor-swesmith-rl-artifacts: Harbor SWE-Smith 强化学习数据产物 (Harbor dataset). If unionizing types on a RootModel, providing a discriminator seems to fail with a TypeError: TypeError: 'definition-ref' is not a valid…
The task
If unionizing types on a RootModel, providing a discriminator seems to fail with a TypeError: ``` TypeError: 'definition-ref' is not a valid discriminated union variant; should be a `BaseModel` or `dataclass` ``` Moving the discriminator to an aggregate root model which has a list of the unionized variants seems to…