I have an endpoint which doesn't return a BaseModel-based response, and returns the following structure:
Dict[EmailStr, MyEnum]
And these are defined / imported like so:
from pydantic import EmailStr
from enum import Enum
class MyEnum(Enum):
FOO1 = "bar1"
FOO2 = "bar2"
Unfortunately, redoc does not provide an accurate example:
{
"property1": "bar1",
"property2": "bar1"
}
I would like the keys to be something like "user@example.com", and the example values to use all of MyEnum's attributes.
Is this possible?
Fastapi: 0.101.0