Azure / Azure/azure-rest-api-specs
[BUG] DatabaseWatcher Enum is named "string"
- 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/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/preview/2023-09-01-preview/Watcher.json#L1603
### API Spec version
2023-09-01-preview
### Describe the bug
This newly added file defines an enum with the name "string". This seems like a mistake. It's not technically invalid but it doesn't tell the user anything and it can cause problems in programs generated from the spec, since "string" is often reserved.
```json
"targetCollectionStatus": {
"type": "string",
"description": "The target collection status.",
"enum": [
"Enabled",
"Disabled"
],
"x-ms-enum": {
"name": "string",
"modelAsString": true,
"values": [
{
"name": "Enabled",
"value": "Enabled",
"description": "Denotes a target that is enabled."
},
{
"name": "Disabled",
"value": "Disabled",
"description": "Denotes a target that is disabled."
}
]
}
},
```
### Expected behavior
The enum has a descriptive name, not a basic type name.
### Actual behavior
The enum is named "string"
### Reproduction Steps
n/a
### Environment
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.