[openstreetmap/openstreetmap-website] Supporting multiple API versions (#2353)

Simon Poole notifications at github.com
Fri Aug 30 10:56:07 UTC 2019


simonpoole commented on this pull request.



> @@ -7,27 +7,54 @@ class CapabilitiesControllerTest < ActionController::TestCase
     def test_routes
       assert_routing(
         { :path => "/api/capabilities", :method => :get },
-        { :controller => "api/capabilities", :action => "show" }
+        { :controller => "api/v06/capabilities", :action => "show", :api_version => "0.6" }

@mmd-osm a reasonable assumption IMHO would be to only actually have different "directory" names for major versions (aka breaking changes), the client can then determine from the capabilities which minor version is actually supported and from that determine which backwards compatible features are present.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2353#discussion_r319461616
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190830/766aed5d/attachment.html>


More information about the rails-dev mailing list