Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide custom pd.Field() wrapper with discriminator=TAG_TYPE_STR #605

Closed
tylerflex opened this issue Dec 7, 2022 · 1 comment
Closed
Assignees

Comments

@tylerflex
Copy link
Collaborator

Maybe this will remove the need for annotate_type().
Worth a try.

@tylerflex
Copy link
Collaborator Author

tylerflex commented Dec 8, 2022

I tried this and it didn't work.
discriminator="type" is only allowed in fields that are type of Union[] with more than one option.
Maybe we can define a special pd.Field() but for now I suggest we just put discriminator=TYPE_TAG_STR in the fields that have Unions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant