Closed jasonjoh closed 1 week ago
Thanks for the suggestion. The solution to that would be to:
Orthogonally, we might have a bug with this flag we should investigate.
Prior work in the space https://github.com/microsoft/kiota-abstractions-dotnet/pull/95 to look at during the bug investigation.
Once this is done, we need to open similar issues for other languages.
seems to be a duplicate of https://github.com/microsoft/kiota-java/issues/1131
Copied from https://github.com/microsoftgraph/msgraph-sdk-java/issues/2064. There should be some mechanism in
KiotaJsonSerialization.serializeAsString
to override backing store so that all fields get serialized without requiring a developer to manually muck with the backing store.Describe the bug
This results in
subscriptionJson
being{}
. This was originally reported in #1879.The suggested fix to call
subscription.getBackingStore().setReturnOnlyChangedValues(false);
did not change the result. It should be noted thatsubscription.getBackingStore().getReturnOnlyChangedValues();
returned false before this anyway. On a whim, I tried callingsubscription.getBackingStore().setReturnOnlyChangedValues(true);
before serializing, and I got a partial result:Expected behavior
subscriptionJson
should be a full JSON representation of the subscription object returned by the service.How to reproduce
Code above.
Graph SDK Version
6.13.0
Latest version known to work for scenario above?
No response
Known Workarounds
This works but is way less convenient than using the static methods. It also requires an explicit reference to microsoft-kiota-serialization-json in your dependencies, which I suspect can cause problems down the line as the SDK bumps its versions.