Model instances that contain `enum` values are not serializable
Open
- Dominant language
- Python
- Stars
- 415
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
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=, input_type=DerivedEnumValue])
```
We should allow deserializing, and serializing enums back and forth from `str`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.