Add support for an unversioned 'versions' API call
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 26 Jun 2019 14:38:20 +0000 (16:38 +0200)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 26 Jun 2019 14:52:10 +0000 (16:52 +0200)
commit2398614349e3ff5605868fea82e013d2a9a16ef9
tree626a9a183dafaf225d387cfc4533721dab98a756
parent5b4636d5213de2e699769821031c37663ab71557
Add support for an unversioned 'versions' API call

This will eventually replace the unversioned 'capabilities' call.
Client applications can use this versions call to find out what versions
are available, if they support multiple versions. The capabilities
of each version, and the format of the capabilities call, is then
able to change between versions. If a client only supports one version
they can jump straight to the versioned capabilities call.

Additionally, supported versions are now a list of version identifiers,
without any implications surrounding min/max values (e.g. guesswork
for supported intermediate versions).

Fixes #2162
app/abilities/api_ability.rb
app/controllers/api/versions_controller.rb [new file with mode: 0644]
app/views/api/versions/show.builder [new file with mode: 0644]
config/routes.rb
test/controllers/api/versions_controller_test.rb [new file with mode: 0644]