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
15 lines
462 B
Ruby
15 lines
462 B
Ruby
module Api
|
|
class VersionsController < ApiController
|
|
authorize_resource :class => false
|
|
|
|
around_action :api_call_handle_error, :api_call_timeout
|
|
|
|
# Show the list of available API versions. This will replace the global
|
|
# unversioned capabilities call in due course.
|
|
# Currently we only support deploying one version at a time, but this will
|
|
# hopefully change soon.
|
|
def show
|
|
@versions = [Settings.api_version]
|
|
end
|
|
end
|
|
end
|