APIv2 Versioning: apiLevel
should be parsed for major.minor
and should be required
#4338
Labels
Milestone
apiLevel
should be parsed for major.minor
and should be required
#4338
overview
When we parse the contents of the
apiLevel
metadata key, we check for the exact strings1
and2
. Instead, we should check for either1
(to provide backwards compatibility with previously written protocols or2.x
. Leading zeroes do not need to be supported.The version stored in a Protocol object should be an enum that provides both major and minor versions. Downstream consumers should also be updated to handle this enum.
If a version is not specified, there should be an exception.
Test cases:
should parse with api level 1.0:
should parse with api level 2.0:
should parse with api level 2.5:
should raise an exception explaining the correct format of the version:
should raise an exception requiring the presence of an api version:
The text was updated successfully, but these errors were encountered: