Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.63k stars 5.08k forks source link

[BUG] Extended location API always returns empty `authentication` block even it's not specified in the request payload #30101

Open jiaweitao001 opened 2 months ago

jiaweitao001 commented 2 months ago

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/b9765efcc5ea795d69aeb8826f78101b3a35c615/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/customlocations.json#L648

API Spec version

2021-08-15

Describe the bug

authentication is an optional attribute, the user can omit this block when creating an extended location resource. But in the API response, it will always show up. If it's not specified by the user, it will be an empty block then.

Expected behavior

authentication should not be returned as part of the response if it's not specified by the user in the request payload.

Actual behavior

authentication always show up in the response even if it's not specified by the user.

Reproduction Steps

Create an extended location resource without configuring authentication block, then intercept the response from the API, you can see an empty authentication block in the response.

Environment

No response

v-jiaodi commented 2 months ago

@aditimalladi Please help take a look, thanks.