Open
Description
Related to microsoftgraph/msgraph-sdk-java#2163 and microsoftgraph/msgraph-sdk-dotnet#2671 (comment)
In a scenario where all the properties in the request body are optional such as an odata action with all parameters being optional, we should set the requestBody.required = false
in the generated openApi description otherwise explictly set it to true
.
https://spec.openapis.org/oas/v3.0.3.html#fixed-fields-10
This will unlock the generation of request body parameters in the SDKs as optional parameters in the builders to prevent breaking changes in scenarios where optional parametes are added.
Activity
autoReconcileProxyConflict
parameter fromrestore
action ofgraph.directoryObject
microsoftgraph/msgraph-metadata#694andrueastman commentedon Sep 25, 2024
Once this is fixed and released, we should revert this PR.
microsoftgraph/msgraph-metadata#697
andrueastman commentedon Oct 2, 2024
Updated the description here. Should be Odata
action
notfunction
. Functions do not have request bodies as the parameters are in the path.irvinesunday commentedon Oct 2, 2024
Also, point of note is that, if
requestBody.required = false
the OAS does not emit therequired
property in therequestBody
schema.andrueastman commentedon Oct 2, 2024
According to the spec.
So what we should do is set it to true when required parameters are present...
irvinesunday commentedon Oct 3, 2024
Trying to retrieve the annotations in-lined in the Action parameters fails to retrieve the
Org.OData.Core.V1.OptionalParameter
annotation using the extensions from the Edm lib.Checking with the OData team to check for its support.
forceTakeover
to theverify
action microsoftgraph/msgraph-metadata#708forceTakeover
to theverify
action microsoftgraph/msgraph-metadata#710