Azure / Azure/azure-rest-api-specs

[BUG] [API Management] polling response didn't respect the format in new api version

Open
#35,010 1 comment 8 reactions 0 assignees View on GitHub
API Management bug customer-reported Mgmt Service Attention
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/main/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/apimnamedvalues.json#L209

### API Spec version

2024-05-01

### Describe the bug

original issue: https://github.com/Azure/azure-sdk-for-python/issues/40909

Calling the api to get operation result for a long operation in api version `2024-05-01`, the response doesn't respect the right format, which causes the exception while polling for the results though SDK. The api works fine in older api versions.

### Expected behavior

It should return `{"status": "Succeeded"}`

### Actual behavior

It returns `{"value":[]}`

### Reproduction Steps

First call API: https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}?api-version=2024-05-01

Then get the operation status by calling: https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/operationResults/5c730e343244df1b9cb56e85?api-version=2024-05-01

Receive `{"value":[]}`

### Environment

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/apimnamedvalues.json at line 209 and compare the operation-result definitions with an older API version. Reproduce the named-values request and polling call from the issue; done means the 2024-05-01 polling response follows the expected status format instead of returning {"value":[]}.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.