You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
While the typescript interfaces generated for the model can be fully compatible with client side models, this is not the case with enums as different string enums cannot be compatible on the client side. Typescript enums are problematic, and the typescript community has a better solution.
Implemented this would allow the client side models and server side models to be entirely decoupled, as enums are the only thing standing in the way of that at the moment.
I realize that many people likely use the server models directly, but a flexible approach would be preferable.
Describe the solution you'd like
The typescript-angular and typescript-axios generator actually already implements this by default (stringEnums = false).
Is your feature request related to a problem? Please describe.
While the typescript interfaces generated for the model can be fully compatible with client side models, this is not the case with enums as different string enums cannot be compatible on the client side. Typescript enums are problematic, and the typescript community has a better solution.
Implemented this would allow the client side models and server side models to be entirely decoupled, as enums are the only thing standing in the way of that at the moment.
I realize that many people likely use the server models directly, but a flexible approach would be preferable.
Describe the solution you'd like
The typescript-angular and typescript-axios generator actually already implements this by default (stringEnums = false).
See this recent merge request:
#11368
It creates an object value enum as such:
The text was updated successfully, but these errors were encountered: