Azure / Azure/azure-rest-api-specs

[BUG] `Microsoft.ApiManagement/service/workspaces/apis@2024-05-01` delete operation returns unexpected 202 status

Open
#39,054 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/2ec4c94bd944ea1230297b26ba6bbfa94becdcce/specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/stable/2024-05-01/apimworkspaces.json#L4246

### API Spec version

2024-05-01

### Describe the bug

WorkspaceApi_Delete is returning a 202 status code unexpectedly, which indicates it should be a long-running operation (LRO).
The expected is:
https://github.com/Azure/azure-rest-api-specs/blob/2ec4c94bd944ea1230297b26ba6bbfa94becdcce/specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/stable/2024-05-01/apimworkspaces.json#L4283-L4298

### Expected behavior

202 should be included in swagger, the operation should be marked as LRO.

### Actual behavior

WorkspaceApi_Delete is returning a 202 status code unexpectedly

### Reproduction Steps

DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-apim-251203043331353144/providers/Microsoft.ApiManagement/service/acctestAM-251203043331353144/workspaces/acctestws251203043331353144/apis/acctestapi-251203043331353144;rev=1?api-version=2024-05-01 HTTP/2.0
x-ms-correlation-request-id: 46c5aa0f-31b7-e388-4718-ee1a7f66230d
content-type: application/json; charset=utf-8
user-agent: HashiCorp/go-azure-sdk (Go-http-Client/1.1 api/2024-05-01) HashiCorp Terraform/1.13.4 (+https://www.terraform.io) terraform-provider-azurerm/acc pid-222c6c49-1b0a-5959-a213-6608f9eb8820
odata-maxversion: 4.0
odata-version: 4.0
accept: application/json; charset=utf-8; IEEE754Compatible=false
accept-encoding: gzip

HTTP/2.0 202
cache-control: no-cache
pragma: no-cache
expires: -1
location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-apim-251203043331353144/providers/Microsoft.ApiManagement/service/acctestAM-251203043331353144/workspaces/acctestws251203043331353144/apis/acctestapi-251203043331353144;rev=1?api-version=2024-05-01&asyncId=692fc3c546346108287d38f3&asyncCode=204
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
azure-asyncoperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-apim-251203043331353144/providers/Microsoft.ApiManagement/service/acctestAM-251203043331353144/tenant/operationResults/692fc3c546346108287d38f3?api-version=2024-05-01
x-ms-request-id: 46c5aa0f-31b7-e388-4718-ee1a7f66230d
x-ms-ratelimit-remaining-subscription-deletes: 199
x-ms-ratelimit-remaining-subscription-global-deletes: 2999
x-ms-correlation-request-id: 46c5aa0f-31b7-e388-4718-ee1a7f66230d
x-ms-routing-request-id: EASTUS2:20251203T045949Z:661cb8be-ab8f-42f2-b37f-8fca4aa7004e
x-cache: CONFIG_NOCACHE
x-msedge-ref: Ref A: AF9E6089095544B0A7B5667624DE3FDB Ref B: SYD03EDGE0714 Ref C: 2025-12-03T04:59:49Z
date: Wed, 03 Dec 2025 04:59:49 GMT
content-length: 0

### Environment

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked apimworkspaces.json section in specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/stable/2024-05-01, around lines 4246 and 4283-4298, and compare the delete response definition with the reproduced 202 response. Done means the specification includes 202 and marks WorkspaceApi_Delete as a long-running operation.

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
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.