Skip to content

Set request body to optional when all properties are optional #582

@andrueastman

Description

@andrueastman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:p1High priority but not blocking. Causes major but not critical loss of functionality SLA <=7days

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions