Closed
Description
Is your feature request related to a problem? Please describe.
Currently anything provided in a schema is assumed to be an object with properties. This means if an Enum is declared in schemas to be shared across endpoints (as is the case in the latest FastAPI/Pydantic), you get an empty dataclass as your enum instead of an actual Enum.
Describe the solution you'd like
Declaring an Enum in a schema should work exactly the same as declaring an Enum in-line for an endpoint. The output should be an Enum in the generated client.
Additional context
A simple way to see the problem is to regenerate the golden-master for end to end tests with the latest FastAPI/Pydantic.