microsoft-graph-devx-api
microsoft-graph-devx-api copied to clipboard
Null values in anonymously generated types in snippets should include type information.
Sourced from https://github.com/microsoftgraph/microsoft-graph-docs-contrib/pull/9067#issuecomment-1915999266
Snippet generated as below correctly places undocumented properties in addtionaldata. However, assinging values that are null in an anonymous object creates the issue on runtime.
var requestBody = new User
{
AdditionalData = new Dictionary<string, object>
{
{
"extkmpdyld2_graphLearnCourses" , new
{
CourseType = "Instructor-led",
CourseId = null,
}
},
},
};
The null value/property should include some type information or an alternative to using anonymous types in the additionalData investigated.