Azure / Azure/azure-rest-api-specs

[BUG] `ApiCenter.Management` @ `2024-03-01` - `PUT` operation for Services requires SKU

Open
#29,502 5 comments 3 reactions 1 assignee Assigned to @azaslonov View on GitHub
bug customer-reported Mgmt question Service Attention
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/main/specification/apicenter/ApiCenter.Management/Service.tsp

### API Spec version

2024-03-01

### Describe the bug

In the API Center API specification, there is no mention of `SKU` in the Create Or Update operation (PUT) for Services.
However, if you do not specify the `SKU` in the request body, you cannot update the Services in API Center.

When `SKU` is not present

GPr35AzbsAAxRdx

When `SKU` is present

![GPr39pbb0AA5O42](https://github.com/Azure/azure-rest-api-specs/assets/28830925/885c0a56-a95e-4892-9035-b17e681728e9)

### Expected behavior

`PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}?api-version=2024-03-01`

Request body

```json
{
"location": "East US",
"tags": {
"foo": "bar"
}
}
```

Response

```json
{
"type": "Microsoft.ApiCenter/services",
"location": "East US",
"sku": {
"name": "Free"
},
"properties": {},
"id": "/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.ApiCenter/services/{{serviceName}}",
"name": "{{serviceName}}",
"tags": {
"foo": "bar"
},
"systemData": {
"createdAt": "2024-06-03T17:34:20.5622751Z",
"lastModifiedAt": "2024-06-19T13:29:55.4211607Z"
}
}
```

### Actual behavior

Response

```json
{
"code": "ValidationError",
"message": "The Sku property on the given model is null. A valid Sku is required to create or update an API Catalog."
}
```

### Reproduction Steps

1. Create API Center resource via Azure Portal
2. Update API Center resource via REST API

### Environment

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.