Azure / Azure/azure-openapi-validator
New rule: api-version parameter should define an enum with the possible api-versions
Open
sdk-rule
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 57
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
Based on feedback in PR https://github.com/Azure/azure-rest-api-specs-pr/pull/309/files#r156773386 it'd be good to have a linter rule that recommends (at least warning) to have an enum defined for the api-version parameter, which would be a constant (in generated code) if there's only one value, or include all the possible api versions. We should also check that x-ms-enum extension exists with modelAsString=true as it's a value that will grow.
It may also be good to have a default value defined for this enum.
Contributor guide
Assessment
This issue has not been assessed yet.