Open
Description
In the definition of the Sku
model (for instance here), 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".