Azure / Azure/azure-rest-api-specs
Virtual Network operations return 200 with Azure-AsyncOperation
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
The REST spec says `200` is returned for "Update successful":
https://github.com/Azure/azure-rest-api-specs/blob/494de57a286ed23d6f7ff7251b79db96dafa6f05/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json#L191-L197
Public doc: https://docs.microsoft.com/en-us/rest/api/virtualnetwork/virtualnetworks/createorupdate#response
When I am updating the `virtualNetworks`, I got `200` with `Azure-AsyncOperation` in the response header:
```sh
> az network vnet create --name myVnetA1 --resource-group myResourceGroupA --location eastus --address-prefix 10.0.0.0/16 --debug
azure.core.pipeline.policies._universal: Request URL: 'https://management.azure.com/subscriptions/414af076-009b-4282-9a0a-acf75bcb037e/resourceGroups/myResourceGroupA/providers/Microsoft.Network/virtualNetworks/myVnetA1?api-version=2020-07-01'
azure.core.pipeline.policies._universal: Request method: 'PUT'
azure.core.pipeline.policies._universal: Response status: 200
azure.core.pipeline.policies._universal: Response headers:
azure.core.pipeline.policies._universal: 'Azure-AsyncOperation': 'https://management.azure.com/subscriptions/414af076-009b-4282-9a0a-acf75bcb037e/providers/Microsoft.Network/locations/eastus/operations/c03bc43c-fe8f-48b7-9060-395483f80590?api-version=2020-07-01'
```
This is against the document [Track asynchronous Azure operations](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations) - `200` response shouldn't have `Azure-AsyncOperation` header. Only `201` or `202` can.
Contributor guide
Research direction
Start with specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json around lines 191-197 and compare its response definitions with the linked asynchronous-operation guidance. Confirm how the observed 200 response with Azure-AsyncOperation should be represented, then ensure the REST specification and its public response documentation agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100