Azure / Azure/azure-rest-api-specs
[BUG] Request body property's type for Virtual Machine Scale Sets - Update is mismatched or fields are missing
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/260ed6a52537921f53a18ffaf4020e3b4d510367/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/virtualMachineScaleSet.json#L5394-L5454
### API Spec version
2024-11-01
### Describe the bug
For `Virtual Machine Scale Sets` update endpoint, the `virtualMachineProfile` property is described as type `VirtualMachineScaleSetUpdateVMProfile`. But in reality, users can send non VirtualMachineScaleSetUpdateVMProfile fields to the API, such as `applicationProfile`. Looks like the type for `virtualMachineProfile` should be `VirtualMachineScaleSetVMProfile`
### Expected behavior
If the virtualMachineProfile type is `VirtualMachineScaleSetUpdateVMProfile`, it shouldn't accept non specified fields and should fail.
### Actual behavior
The PATCH request with `applicationProfile` fields data is updated successfully
### Reproduction Steps
Request body:
```
{
"properties": {
"virtualMachineProfile": {
"applicationProfile": {
"galleryApplications": [{
"configurationReference": "https://accteststrlucia.blob.core.windows.net/ll/script2",
"order": 1,
"packageReferenceId": "/subscriptions/***/resourceGroups/acctestRG-vmss-lucia/providers/Microsoft.Compute/galleries/acctestsig/applications/acctest-app/versions/0.0.1",
"tags": "app"
}]
}
}
}
}
```
API Endpoint:
`https://management.azure.com/subscriptions/***/resourceGroups/acctestRG-vmss-lucia/providers/Microsoft.Compute/virtualMachineScaleSets/acctestvmss?api-version=2024-11-01`
Method: `PATCH`
### Environment
_No response_
Contributor guide
Research direction
Open specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-07-01/virtualMachineScaleSet.json around lines 5394-5454 and compare the virtualMachineProfile schema with the reported 2024-11-01 PATCH request. Determine whether applicationProfile belongs in the accepted update shape, then update the specification so the documented type matches the API behavior and verify the schema covers the reported request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100