-
-
Notifications
You must be signed in to change notification settings - Fork 198
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: ensure unions of enums are rendered for properties for TS #155
feat: ensure unions of enums are rendered for properties for TS #155
Conversation
It may be enough and I will use it but I don`t like it. |
I belive that if you can create mutual enum, it would be nice to add way specify somehow const using values from referenced enum. |
Hmm... @czlowiek488 just to make it perfectly clear what you are looking for, please correct me if I am wrong 😄 Given the input of the following JSON Schema:
You expect the output of the class to be:
Instead of what it currently will generate:
|
@jonaslagoni Yes, exactly. |
Also it would be awesome if I could make use of enum to specify a value in interface.
|
@jonaslagoni After a bit of thinking, it may be good to have a way to specify enums keys and values to achieve something like here.
|
Kudos, SonarCloud Quality Gate passed!
|
@czlowiek488 would you mind creating an issue with your use case? |
🎉 This PR is included in version 0.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
This PR ensures the type for properties are rendered with enums if sat.
Related issue(s)
solves #133