Azure / Azure/azure-rest-api-specs
MachineLearningServices - Skus should have possible values defined in enum and `x-ms-enum`
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
In the definition of the `Sku` model (for instance [here](https://github.com/Azure/azure-rest-api-specs/blob/4fe7cd48e1c3498e1ef649cacfcaada2392501b3/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2021-01-01/machineLearningServices.json#L4315)), we need an enum type for both of the `name` and `tier` to show the possible values. For instance like this:
```
"Sku": {
"description": "Sku of the resource",
"type": "object",
"properties": {
"name": {
"description": "Name of the sku",
"type": "string",
"enum": {
"Basic"
},
"x-ms-enum": {
"name": "SkuTypes",
"values": [
{"name": "Basic", "description": "Blabla"}
]
}
},
"tier": {
"description": "Tier of the sku like Basic or Enterprise",
"type": "string",
"enum": {
"Basic"
},
"x-ms-enum": {
"name": "SkuTypes",
"values": [
{"name": "Basic", "description": "Blabla"}
]
}
}
}
},
```
With this enum defined in the swagger, we could make the swagger self-explainable without reading the document thoroughly, also we could get the customers aware of the breaking changes more actively like the "deprecation of the Enterprise Sku".
Contributor guide
Research direction
Start with the Sku definition in specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2021-01-01/machineLearningServices.json around line 4315, focusing on the name and tier properties. Review nearby enum and x-ms-enum patterns and confirm the intended possible values; done means both properties document their valid values and enum metadata in the swagger.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100