Azure / Azure/azure-openapi-validator
Rule Update Request: Update to existing ApiVersionPattern rule to support canonical swagger
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 57
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
### Lint rule description
ARM has a new initiative that will generate a canonical version of swagger from TypeSpec which amalgamate all versions of models into [a single swagger file](https://github.com/Azure/azure-rest-api-specs-pr/blob/db68ae0972e72e68bed18e657281495ebc0dfe79/specification/dinwadevtest/resource-manager/Microsoft.Contoso/canonical/openapi.json) under a new `canonical` folder which is at same level of `stable` and `preview`.
The version specified in this JSON is hard coded to `canonical`. The combination of `canonical` folder and API version being `canonical` should bypass this check.
### Related swagger example
https://github.com/Azure/azure-rest-api-specs-pr/blob/db68ae0972e72e68bed18e657281495ebc0dfe79/specification/dinwadevtest/resource-manager/Microsoft.Contoso/canonical/openapi.json#L5
### Category
ARM
### Severity level
Error
### Applies to
Management plane API spec
### How to fix the violation
The combination of `canonical` folder and API version being `canonical` should bypass this check with date-time format.
### What't the impact if breaking the rule
N/A
Contributor guide
Assessment
This issue has not been assessed yet.