When using Literal[MyEnum.CONSTANT] in BaseModel definition, MyEnum is not correctly provided to the openapi.json definition. We are using OpenAPI to expose backend types to our front-end UI. In this case, the Enum is not properly shared with the front-end. How can one force FastAPI to expose it? Continue reading...