ga4gh / vrs-python

GA4GH Variation Representation Python Implementation
https://github.com/ga4gh/vrs
Apache License 2.0
51 stars 27 forks source link

Object types return ENUM instead of ENUM.value #433

Closed ahwagner closed 4 months ago

ahwagner commented 4 months ago

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
jsstevenson commented 4 months ago

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 commented 4 months ago

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