openstreetmap-website
openstreetmap-website copied to clipboard
Allow setting JSON return type by HTTP ACCEPT header for notes API
Currently the notes API json return type can only be specified by appending the .json file extension at the end of the URL path. This is inconsistent to other JSON API entry points which also allow specifying the return type via the HTTP ACCEPT header.
I guess the routing tests (see example below) do not catch these cases because they do not allow to specify headers.
assert_routing(
{ :path => "/api/0.6/notes/1.json", :method => :get },
{ :controller => "api/notes", :action => "show", :id => "1", :format => "json" }
)