edgedb-python
edgedb-python copied to clipboard
Model instances that contain `enum` values are not serializable
When returning an object from a FastAPI endpoint using a response_model that contains an enum, you current will see an error like:
PydanticSerializationUnexpectedValue(Expected `enum` - serialized value may not be as expected [field_name='meep', input_value=<gel.EnumValue 'BeepBoop'>, input_type=DerivedEnumValue])
We should allow deserializing, and serializing enums back and forth from str.