Azure / Azure/azure-rest-api-specs
[BUG] Dashboard name's regular expression is too strict
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 37m
- Merged PRs (30d)
- 446
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/b9e65c8997ce097af3f773a48d2ea2e0535f3cca/specification/portal/resource-manager/Microsoft.Portal/preview/2022-12-01-preview/portal.json#L185-L192
### API Spec version
2022-12-01-preview
### Describe the bug
Portal Dashboard's Name has a regular expression `"pattern": "^[a-zA-Z0-9-]{3,24}$"` which defines the maximum length to 24. This is wrong in practice: longer names are allowed. The same property has `"maxLength": 64,` on it, while [Bicep docs](https://learn.microsoft.com/en-us/azure/templates/microsoft.portal/dashboards?pivots=deployment-language-bicep#dashboards) say the max length is 160.
Regression was introduced in https://github.com/Azure/azure-rest-api-specs/pull/29796
### Expected behavior
"pattern": "^[a-zA-Z0-9-]{3,160}$"
### Actual behavior
"pattern": "^[a-zA-Z0-9-]{3,24}$"
### Reproduction Steps
It's about the Open API spec being wrong.
### Environment
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.