azure-rest-api-specs icon indicating copy to clipboard operation
azure-rest-api-specs copied to clipboard

[BUG][Web] Error "Properties object is not present in the request body." returns when try to create a secret which does not have the parameter propertities

Open ChenxiJiang333 opened this issue 1 year ago • 1 comments

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/WebApps.json#L26501

API Spec version

2023-12-01

Describe the bug

According to the swagger definition, a secret request body has only parameters name and value, but not properties.

Yet when send the body to a secret create api, it returns error message "Properties object is not present in the request body.":

{"name": "keyname", "value": "keyvalue"}

Simply add an additional parameter Properties, the request succeeded, and a new key created, but such behavior seems not expected:

{"name": "keyname", "value": "keyvalue", "Properties": {}}

Expected behavior

Request should succeed with body {"name": "keyname", "value": "keyvalue"}.

Actual behavior

It only accepts the body as {"name": "keyname", "value": "keyvalue", "Properties": {}}, which blocks the request made through SDK.

Reproduction Steps

Send request to api https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}?api-version=2023-12-01 with body {"name": "keyname", "value": "keyvalue"}.

Environment

No response

ChenxiJiang333 avatar Jul 04 '24 08:07 ChenxiJiang333

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.