SDK Error
ARM and Data plane OpenAPI(swagger) specs
Must not have duplicate name in x-ms-enum extension , make sure every x-ms-enum name unique.
This rule will check all the swagger files with the same api-version, and ensure there is no duplicate x-ms-enum name. The following cases are deemed as violation:
- if two enums have the same x-ms-enum name , but types are different.
- if two enums have the same x-ms-enum name , but 'modelAsString' are different.
- if two enums have the same x-ms-enum name , but include different values.
- if two enums have the same x-ms-enum name and 'modelAsString' is false , but enums' values have different order.
March 18, 2020
January 14, 2021
Update the duplicate x-ms-enum name :
The following would be invalid:
"State": {
"description": "The state of the configuration store.",
"enum": [
"Failed",
"Canceled"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"name": "DuplicateName",
"modelAsString": true
}
},
"status": {
"description": "The state code.",
"enum": [
"Success",
"FAILED"
],
"readOnly": true,
"type": "string",
"x-ms-enum": {
"name": "DuplicateName",
"modelAsString": true
}
}
}