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

Enums are suffixed with Enum? #89

Closed
AnderssonPeter opened this issue Apr 24, 2024 · 6 comments · Fixed by #109
Closed

Enums are suffixed with Enum? #89

AnderssonPeter opened this issue Apr 24, 2024 · 6 comments · Fixed by #109
Labels
question Further information is requested

Comments

@AnderssonPeter
Copy link

Describe the bug
All enums that are generated now end with Enum this was not the case before.
Are there any flags to disable this?

To Reproduce
Steps to reproduce the behavior:

  • Expose a enum in the OpenAPI specification

Expected behavior
To not have Enum as an suffix.

  • OS: Windows 11
  • Version 1.2.0
@seriouslag
Copy link
Collaborator

seriouslag commented Apr 24, 2024

I don't believe you can disable it, as those are generated from the service generator we use @hey-api/openapi-ts

Opening an issue in that project may be helpful.

I would recommend against using typescript enums in general.
https://dev.to/ivanzm123/dont-use-enums-in-typescript-they-are-very-dangerous-57bh

@seriouslag seriouslag added the question Further information is requested label Apr 24, 2024
@AnderssonPeter
Copy link
Author

I'm faily certain that 1.1.0 did not have this issue (the output in #85 indicates that this is correct)
But i can see that the @hey-api/openapi-ts was upgraded to 0.42.1, but i will create a issue over there.

@AnderssonPeter
Copy link
Author

hey-api/openapi-ts#491

@AnderssonPeter
Copy link
Author

@seriouslag it looks like @hey-api/[email protected] solved this issue, any chance you could upgrade?

@seriouslag
Copy link
Collaborator

Updated to 0.43.0 in latest.

@AnderssonPeter
Copy link
Author

Thanks for your fast response, it works like a charm!!

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

Successfully merging a pull request may close this issue.

2 participants