Closed
Description
Symptoms
When multiple ApiVersion instances with a status are compared, the correct result is returned. Consider sorting a set of ApiVersions:
- 1.0-RC
- 1.0-Alpha
- 1.0-Beta
Will be correctly sorted as:
- 1.0-Alpha
- 1.0-Beta
- 1.0-RC
However, if an ApiVersion is included without a status, that instance is evaluated lower than other instances. For example, if "1.0" is added, the list should be:
- 1.0-Alpha
- 1.0-Beta
- 1.0-RC
- 1.0
But is instead:
- 1.0
- 1.0-Alpha
- 1.0-Beta
- 1.0-RC
Resolution
An ApiVersion with the same group version and/or major and minor version should always be greater than an equivalent ApiVersion that includes a status.