REST API for tags: alphabetical sorting does not scale for semantic versioning
Description
Currently the order of the tags are returned in a fixed way. There is no way to specify the order in the request.
From the docs:
sorted by name in reverse alphabetical order
When using semantic versioning which is probably a very often use case for tags,
the REST API is a bit useless, since the alphabetical order is not compatible for semantic versioning sorting.
You can test it here: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/repository/tags You won't get the latest version (10.x) without search for multiple paginated pages.
To get version 10 you need page 10: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/repository/tags?page=32
This solution doesn't scale and is totally broken IMHO.
Proposal
Solution 1
Change order to respect semantic versioning
Solution 2
Allow to pass a query parameter which allows to sort by last update (like in the web interface) this should be in most cases be the same order as for semantic versioning