Azure / Azure/azure-rest-api-specs
`Microsoft.MachineLearningServices/registries`: missing status code definition in `Registries_CreateOrUpdate` Operation
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
The API actually returns a Status code as `202` when creating a machine learning registry suceess. but `202` is not listed in the seagger as below. this causes breaking behavior in SDK generation.
https://github.com/Azure/azure-rest-api-specs/blob/af928203edfa7a9bd5c1f96fa9c4c0a555d11474/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-04-01/registries.json#L310-L329
an example request/response as below:
```
PUT https://management.azure.com/subscriptions/xxx/resourceGroups/acctestRG-230802181308921350/providers/Microsoft.MachineLearningServices/registries/accmlc-230802181308921350?api-version=2023-04-01 HTTP/2.0
content-type: application/json; charset=utf-8
user-agent: HashiCorp/go-azure-sdk (Go-http-Client/1.1 registrymanagement/2023-04-01) HashiCorp Terraform/1.3.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
authorization: Bearer xxx
x-ms-correlation-request-id: 1c704d06-c7df-324a-9b09-f08a5e01ea06
content-length: 806
accept-encoding: gzip
{"identity":{"type":"SystemAssigned","userAssignedIdentities":null},"location":"eastus","name":"accmlc-230802181308921350","properties":{"publicNetworkAccess":"Enabled","regionDetails":[{"acrDetails":[{"systemCreatedAcrAccount":{"acrAccountName":"","acrAccountSku":"Premium"}}],"location":"eastus","storageAccountDetails":[{"systemCreatedStorageAccount":{"allowBlobPublicAccess":false,"storageAccountHnsEnabled":false,"storageAccountName":"","storageAccountType":"Standard_LRS"}}]},{"acrDetails":[{"systemCreatedAcrAccount":{"acrAccountName":"","acrAccountSku":"Premium"}}],"location":"EastUS2","storageAccountDetails":[{"systemCreatedStorageAccount":{"allowBlobPublicAccess":false,"storageAccountHnsEnabled":false,"storageAccountName":"","storageAccountType":"Standard_LRS"}}]}]},"tags":{"key":"example"}}
HTTP/2.0 202 <- status code is 202
cache-control: no-cache
pragma: no-cache
expires: -1
location: https://management.azure.com/subscriptions/xxxx/providers/Microsoft.MachineLearningServices/locations/eastus/registryOperationsStatus/be14b657-56b7-425f-93d9-eb20c0a2618a?api-version=2023-04-01&type=location
x-ms-ratelimit-remaining-subscription-writes: 1199
request-context: appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d
x-ms-response-type: standard
azure-asyncoperation: https://management.azure.com/subscriptions/xxxx/providers/Microsoft.MachineLearningServices/locations/eastus/registryOperationsStatus/be14b657-56b7-425f-93d9-eb20c0a2618a?api-version=2023-04-01&type=async
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-aml-cluster: vienna-eastus-02
x-request-time: 0.626
x-ms-request-id: 1f311000-2fe6-40c2-bf6a-82ca84447323
x-ms-correlation-request-id: 1c704d06-c7df-324a-9b09-f08a5e01ea06
x-ms-routing-request-id: EASTASIA:20230802T143857Z:1f311000-2fe6-40c2-bf6a-82ca84447323
date: Wed, 02 Aug 2023 14:38:57 GMT
content-length: 0
```
```[tasklist]
### Tasks
```
Contributor guide
Research direction
Open specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-04-01/registries.json at the Registries_CreateOrUpdate operation referenced in the issue. Verify the documented responses against the example request, add the missing successful status definition, and confirm the API specification accepts the response for SDK generation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100