Azure / Azure/azure-rest-api-specs
[BUG] Azure EventHub name validation is inconsistent
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
Original issue in the Azure Service Operator project: https://github.com/Azure/azure-service-operator/issues/4890
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/7c640375cebac863ef3430e8ac9aa8cae4843677/specification/eventhub/resource-manager/common/v1/definitions.json#L154
### API Spec version
2023-01-01
### Describe the bug
The validation is inconsistent
```
"pattern": "^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$",
"minLength": 6,
"maxLength": 50,
```
pattern and minLength don't match
### Expected behavior
validations should match
### Actual behavior
they don't
### Reproduction Steps
create object with name `abcdef` which is valid according to docs: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsofteventhub
### Environment
_No response_
Contributor guide
Research direction
Open the linked definitions.json at line 154 and compare its pattern, minLength, and maxLength with the Microsoft Event Hubs naming rules for the 2023-01-01 spec. Reproduce with the name `abcdef`; done means the schema constraints agree with the documented rules and accept or reject that example consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100