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

Object types return ENUM instead of ENUM.value #433

Closed
ahwagner opened this issue Jul 17, 2024 · 2 comments · Fixed by #434
Closed

Object types return ENUM instead of ENUM.value #433

ahwagner opened this issue Jul 17, 2024 · 2 comments · Fixed by #434
Assignees
Labels
bug Something isn't working priority:high High priority

Comments

@ahwagner
Copy link
Member

When running the Jupyter notebooks, I noticed that VRS objects are being returned with what looks like an ENUM entry for the object type field:

image

Instead, we expect these to be specified by enum.value:

image
@ahwagner ahwagner added bug Something isn't working priority:high High priority labels Jul 17, 2024
@jsstevenson
Copy link
Contributor

jsstevenson commented Jul 17, 2024

Is there a need to build this behavior into model_dump rather than reserving model_dump_json (https://docs.pydantic.dev/latest/concepts/serialization/#modelmodel_dump_json) for this? edit: or rather, use mode="json" as an arg

@ahwagner
Copy link
Member Author

I'm not sure about that–I think this has to do with what gets populated in the model, not how it is serialized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:high High priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants