microsoft-graph-devx-api
microsoft-graph-devx-api copied to clipboard
Create forward snippet should create an empty type rather than null.
Taking a look at the snippet at https://learn.microsoft.com/en-us/graph/api/message-createforward?view=graph-rest-1.0&tabs=csharp#example-1-create-a-draft-message-in-json-format-to-forward-an-existing-message
var result = await graphClient.Me.Messages["{message-id}"].CreateForward.PostAsync(null);
The snippet generated compiles but fails to run due to the validation of the PostAsync
checking for null. Since the body is null, the generator should create an empty parameter as
var result = await graphClient.Me.Messages["{message-id}"].CreateForward.PostAsync(new CreateForwardPostRequestBody());
Sourced from https://github.com/microsoftgraph/microsoft-graph-docs-contrib/pull/9068