Azure / Azure/azure-openapi-validator

[new rule]: check orphan definition/parameter

Open
#311 3 comments 0 reactions 0 assignees View on GitHub
Customer-Request p1 sdk-rule
Dominant language
TypeScript
Stars
53
Forks
57
Avg merge
1d 23h
Merged PRs (30d)
2

Description

### Lint rule description

If a definition or a parameter is never used in any operation, there should be an error.

### Related swagger example

`TunnelConnectionStatus` in `network` API is never used: https://github.com/Azure/azure-rest-api-specs/blob/62f25f0db93c098813004f447b5afe9399c82ad1/specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/virtualWan.json#L7162

### Category

ARM

### Severity level

Error

### Applies to

Management plane API spec, Data plane API spec

### How to fix the violation

Remove the orphan definition/parameter

### What't the impact if breaking the rule

Orphan definition/parameter could result in orphan class in the generated SDK codes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.