Azure / Azure/azure-openapi-validator
[new rule]: Validate content of `x-ms-arm-id-details` extension
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 57
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
### Lint rule description
We should validate that the content of `x-ms-arm-id-details` be of correct format.
### Related swagger example
Service writes specs with wrong definition and linter didn't detect that: https://github.com/Azure/azure-rest-api-specs/pull/32033#issuecomment-2579321408
```json
"x-ms-arm-id-details": [
{
"type": "Microsoft.KeyVault/vaults"
}
]
```
which should be
```json
"x-ms-arm-id-details": {
"allowedResources": [
{
"type": "Microsoft.KeyVault/vaults"
}
]
}
```
This difference is very hard to detect. Would be great to have a dedicated linter rule for this.
### Category
SDK
### Severity level
Error
### Applies to
Management plane API spec
### How to fix the violation
Comply to the [`x-ms-arm-id-details` definition](https://azure.github.io/autorest/extensions/#x-ms-arm-id-details)
### What't the impact if breaking the rule
SDK generation would fail.
Contributor guide
Assessment
This issue has not been assessed yet.