-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Bug Report 🐛
Invalid TS code is generated from this model. Looks like the logic to generate unions doesn't take into account scalars or enums.
namespace [email protected]
concept Address {
o String street
o String city
o String zip
}
concept Order {
o String sku
o Integer amount
}
concept LoyaltyStatus {
o String level
}
enum Color {
o RED
o GREEN
o BLUE
o PINK
o BLACK
o WHITE
}
concept Preferences {
o Color[] favoriteColors optional
}
@template
concept TemplateData {
o String firstName
o String lastName
o String[] middleNames
o Boolean active
o DateTime lastVisit
o Address address
o Order[] orders
o LoyaltyStatus loyaltyStatus optional
o Preferences preferences
}
Expected Behavior
Generates code that compiles.
Current Behavior
Code doesn't compile because a union is created containing IColor, even though Color is an enum.
Possible Solution
Steps to Reproduce
Context (Environment)
Desktop
- OS: [e.g. macOS]
- Browser: [e.g. Chrome, Safari]
- Version: [e.g. 0.22.15]
Detailed Description
Possible Implementation
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Next 3 Months