-
Notifications
You must be signed in to change notification settings - Fork 202
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: enum serialization #5309
base: main
Are you sure you want to change the base?
Fix: enum serialization #5309
Conversation
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.
Thanks for the contribution!
In the issue you were mentioning that you're having issue implementing a unit test.
Can you please also include the draft unit test in this pull request?
Hey @baywet |
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
@Kindest13 I've just pushed an example unit test. I think the changes are getting us to the right direction but are not enough yet.
Regardless, all methods need to ALSO accept the serialization object so we can map enum members to their serialization representations, which is not implemented today. Let us know if you have any additional comments or questions. I'd also like @andrueastman opinion on this one. |
I think this also what we were trying to solve with the I agree with making the property default as a collection for now. That requires us to pass extra information to the serializer to differentiate the case 2 and 3. But that is solved with the separate methods for now (once we add the method for Similar to GO we could also generate the string conversion function for the enum but that would lead to a bigger footprint in generation. |
Thank you for the additional information @andrueastman If we focused on "this version of the generation across all languages" I believe we could "align" TypeScript with the changes I've described in my previous reply. Anything I might have missed? Or issues? In your opinion. |
Fixes microsoft/kiota-typescript#1276