[openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)
mmd
notifications at github.com
Tue Apr 22 21:23:29 UTC 2025
@mmd-osm commented on this pull request.
> @@ -7,7 +7,10 @@ class TracesController < ApiController
def index
@traces = current_user.traces.reload
- render :content_type => "application/xml"
+ respond_to do |format|
+ format.xml { render :content_type => "application/xml" }
+ format.json { render :content_type => "application/json" }
+ end
Currently, test cases seem to be failing with `Expected response to be a <2XX: success>, but was a <406: Not Acceptable>`
I think we would need something like `before_action :set_request_formats` to set XML as default format, similar to what we're doing for element endpoints (node/way/relation).
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5943#discussion_r2054904936
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5943/review/2785415923 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250422/0eb9013b/attachment.htm>
More information about the rails-dev
mailing list