Azure / azure-openapi-validator

Azure Open API Validator
MIT License
48 stars 45 forks source link

[ResourceNameRestriction] Should enums (without "pattern") be treated as valid or invalid? #501

Open JackTn opened 1 year ago

JackTn commented 1 year ago

Describe the bug https://github.com/Azure/azure-rest-api-specs/pull/22978/checks?check_run_id=13024521883

The resource name parameter 'notificationName' should be defined with a 'pattern' restriction. Location: Microsoft.ApiManagement/preview/2022-09-01-preview/apimworkspaces.json#L1828

The parameter already has restriction as defined here

https://github.com/Azure/azure-rest-api-specs/blob/e6e61df03b325344f43cdfe756c44ed58d94e409/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-09-01-preview/apimanagement.json#L467

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

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

Desktop (please complete the following information):

Additional context Details in https://github.com/Azure/azure-rest-api-specs/issues/23737

JackTn commented 1 year ago

@solankisamir Follow this ~

mikeharder commented 2 months ago

Another hit: https://github.com/Azure/azure-rest-api-specs-pr/pull/18557/checks?check_run_id=26319696623

mikeharder commented 2 months ago

Adding unit test to determine if this is a bug or by design: https://github.com/Azure/azure-openapi-validator/pull/714