-
Notifications
You must be signed in to change notification settings - Fork 57
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
Fix: generator can handle enum type with one member #699
Conversation
const types: EdmxEnumType[] = forceArray(root.EnumType); | ||
return types.map(edmxEnumType => ({ | ||
Name: edmxEnumType.Name, | ||
Member: forceArray(edmxEnumType.Member) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When there is only one member, the type of the Member
is an object instead of an array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is essentially the fix, right? ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
const types: EdmxEnumType[] = forceArray(root.EnumType); | ||
return types.map(edmxEnumType => ({ | ||
Name: edmxEnumType.Name, | ||
Member: forceArray(edmxEnumType.Member) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is essentially the fix, right? ;)
This PR will fix the issue reported here, where the generator fails when it detects a enum type with one element.