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
This commit is contained in:
Andy Allan 2019-06-26 16:38:20 +02:00
parent 5b4636d521
commit 2398614349
5 changed files with 60 additions and 1 deletions

View file

@ -0,0 +1,8 @@
xml.instruct! :xml, :version => "1.0"
xml.osm(OSM::API.new.xml_root_attributes.except("version")) do |osm|
osm.api do |api|
@versions.each do |version|
api.version version
end
end
end