Azure / Azure/azure-openapi-validator
[new rule]: Property names conflict after applying x-ms-client-flatten
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 57
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
### Lint rule description
Property name collisions may occur when applying x-ms-client-flatten. And it's hard to detect when writing swagger. This lint rule can help detect such conflicts.
### Related swagger example
[VirtualNetworkGatewayNatRule](https://github.com/Azure/azure-rest-api-specs/blob/0b1c0be5c97dcd5dadea4e7f975a556a78f58d60/specification/network/resource-manager/Microsoft.Network/stable/2022-01-01/virtualNetworkGateway.json#L2674-L2702) has `type` property name, and `type` is also included in `VirtualNetworkGatewayNatRuleProperties`. And when flatten, they are conflicted.
### Category
SDK
### Severity level
Error
### Applies to
Management plane API spec, Data plane API spec
### How to fix the violation
Change the conflicted name or use `x-ms-client-display-name`
### What't the impact if breaking the rule
Client tools cannot display the correct output.
Contributor guide
Assessment
This issue has not been assessed yet.