Azure / Azure/azure-rest-api-specs
[BUG] `ApiCenter.Management` @ `2024-03-01` - `PUT` operation for Services requires SKU
- 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
When `SKU` is present

### 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
Assessment
This issue has not been assessed yet.