Azure / Azure/azure-openapi-validator

The `ResourceNameRestriction` rule incorrectly flags enumerated resource names

Open
#726 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
53
Forks
57
Avg merge
1d 23h
Merged PRs (30d)
2

Description

**Describe the bug**
When a resource name is restricted to an enumerated set of names, there is no need for a pattern restriction - this rule should not report a violation for such cases, [here is an example](https://github.com/Azure/azure-rest-api-specs-pr/blob/459052fffb0e2129364fbb5724d5bbbd20067959/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2024-08-01-preview/playwrighttesting.json#L243-L269)

**To Reproduce**
See the example above

**Expected behavior**
The rule should not show a violation if the name uses an enumerated set of possible names

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
n/a

**Additional context**
Add any other context about the problem here.

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.