-
Notifications
You must be signed in to change notification settings - Fork 12
Conversation
I just have a question here... Why is the enum not there in the first place? I'm confused?! |
@sebastienlevert I believe the fix here is made to align with other languages. Essentially, the scenario here is when the API is updated, and your production code is running a certain version of a generated SDK. If the API starts returning a new value in the enumeration, your code should not start breaking due to exceptions/errors being thrown and break the application. Instead, the Enum property should be set to the default (null) till the time you update your code to handle the new value. |
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.
Do we need a version bump/changelog entry? and possibly tests similar to https://github.com/microsoft/kiota-serialization-json-dotnet/blob/99db4c2d27af5846207794390b4d8e935b1e6472/Microsoft.Kiota.Serialization.Json.Tests/JsonParseNodeTests.cs#L125
Quality Gate passedIssues Measures |
Fixes microsoftgraph/msgraph-sdk-python#480
Fixes microsoftgraph/msgraph-sdk-python#222
Overview
Currently - serializing an enum throws a KeyError if the key is not found in the Enum mapping
Related Issue
Fixes this and relates to this
Demo
Before
After