-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reusable enums are not working #542
Comments
@alejandrod-f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
I can not find a way to get enums to be generated in a way that are reused.
Based on some research, looks like we should be using
@Schema(enumAsRef = true)
. But, it does not work.I'd actually suggest that maybe this should be a global option. Wondering why is not the default... in the code you usually do not repeat the enums.
Spec ref: https://swagger.io/docs/specification/data-models/enums/
I tried these both:
They both generate something like:
expected:
The text was updated successfully, but these errors were encountered: