Skip to content
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

feat(OpenApiType): Suggest creating aliases for enums #209

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

provokateurin
Copy link
Member

Closes #178

@provokateurin provokateurin requested a review from come-nc January 27, 2025 13:34
Copy link

@come-nc come-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not completely convinced by the point of this. The non-aliased enum in the test routes are easier to read 🙈

@provokateurin
Copy link
Member Author

But once you use the same enum twice it is much better to reuse a type alias.
It's also much better for generated code (except for Typescript maybe), as you have proper type definitions for the enums.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest to create type aliases for all enums
2 participants