-
Notifications
You must be signed in to change notification settings - Fork 14
Description
This may be a false positive related to date vs version based tagging:
Repro Steps
$ npx avocado -d specification/keyvault/data-plane
{"level":"Error","code":"NOT_LATEST_API_VERSION_IN_DEFAULT_TAG","message":"The default tag does not contains the latest API version. Please make sure the latest api version swaggers are in the default tag.","tag":"default","readMeUrl":"/home/mharder/specs/specification/keyvault/data-plane/readme.md","jsonUrl":"/home/mharder/specs/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.6/storage.json","path":"/home/mharder/specs/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.6/storage.json","apiPath":"/storage/{storage-account-name}/sas/{sas-definition-name}"}
An easy fix could be to sort all numeric versions (e.g. 7.6) lower than all date-based versions (e.g. 2024-01-01).
if (!startsWithDate(apiVersion)) {
// Prefix non-date-based strings with "!", so they sort before other date-based
let apiVersionForSorting = `!${apiVersion}`;
}
This would work, if all new versions should be date-based. However, there is a new proposal for some specs to have both date-based and number-based versions in parallel. So, I don't think Avocado should change anything, until this new proposal is finalized.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status