Re: [openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)

2025-05-19 Thread Kyℓe Hensel via rails-dev
k-yle left a comment (openstreetmap/openstreetmap-website#5973) If we decide to get rid of the `create`/`update`/`delete` blocks, then there are two options (broadly speaking): 1. allow attributes to be specified some some elements only. Requires a nested array: ```jsonc { "osmChange": [

Re: [openstreetmap/openstreetmap-website] Proposal for adding support for map notes tags (Issue #5294)

2025-05-07 Thread Kyℓe Hensel via rails-dev
k-yle left a comment (openstreetmap/openstreetmap-website#5294) would this allow the user who closes a note to add tags? use case: the person who closes the note wants to link the note to the changeset that solved the issue - https://github.com/openstreetmap/iD/issues/9510 -- Reply to this

Re: [openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)

2025-05-04 Thread Kyℓe Hensel via rails-dev
k-yle left a comment (openstreetmap/openstreetmap-website#5973) for completeness, another option that hasn't been mentioned yet is: ```jsonc { "osmChange": [ { "type": "create", "elements": [a, b, c] }, { "type": "delete", "elements": [d, e] }, { "type": "modify", "elements": [f, g]

Re: [openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)

2025-05-01 Thread Kyℓe Hensel via rails-dev
k-yle left a comment (openstreetmap/openstreetmap-website#5973) got it, I wonder if we actually need to support this behaviour in the new JSON upload endpoint. Since this is brand new, we have a (somewhat rare) opportunity to define the format more strictly. I think it's important that upload

Re: [openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)

2025-05-01 Thread Kyℓe Hensel via rails-dev
k-yle left a comment (openstreetmap/openstreetmap-website#5973) > Now for the upload, you might have multiple create/modify/delete blocks in > random order, including repeating blocks for the same action. How would this > work with your proposed format? If I understand you correctly, you're ref

Re: [openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)

2025-05-01 Thread Kyℓe Hensel via rails-dev
@k-yle commented on this pull request. > @@ -0,0 +1,7 @@ +json.partial! "api/root_attributes" + +json.osmChange do + json.create @created.map { |elt| JSON.parse(render(partial: "api/#{elt.to_partial_path}", object: elt)) } + json.modify @modified.map { |elt| JSON.parse(render(partial: "api/#

Re: [openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)

2025-05-01 Thread Kyℓe Hensel via rails-dev
@k-yle pushed 1 commit. 4a83726780112a29e01e4d061ad5e8b1bba1580c Implement JSON support for the changeset download API -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5973/files/097c347442e60ac971f5f4c95b136341c2c06db3..4a83726780112a29e01e4d061ad5e8b1bba1580c

[openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)

2025-05-01 Thread Kyℓe Hensel via rails-dev
Closes #5970 ### Description Created a new endpoint `/changeset/:id/download.json` which returns the `osmChange` in a JSON format in addition to the existing XML endpoint. For example: ```jsonc { "version": "0.6", "generator": "OpenStreetMap server", "copyright": "OpenStreetMap and contri

Re: [openstreetmap/openstreetmap-website] JSON support for /changeset/:id/download (Issue #5970)

2025-04-30 Thread Kyℓe Hensel via rails-dev
k-yle left a comment (openstreetmap/openstreetmap-website#5970) would it make sense to implement it here first, and then port it to cgimap? I assume that the idealistic outcome is an identical implementation in ruby and c++ -- Reply to this email directly or view it on GitHub: https://github.c

Re: [openstreetmap/openstreetmap-website] JSON support for /changeset/:id/download (Issue #5970)

2025-04-30 Thread Kyℓe Hensel via rails-dev
k-yle left a comment (openstreetmap/openstreetmap-website#5970) true, but it doesn't work in nodejs, so you can't reuse the same code in the browser and node. It's also extremely cumbersome to parse and generate xml, and you lose all the typesafety benefits from the JS/TS ecosystem -- Reply

Re: [openstreetmap/openstreetmap-website] GSoC project: JSON support for some API endpoints (element upload) (Issue #3501)

2025-04-30 Thread Kyℓe Hensel via rails-dev
k-yle left a comment (openstreetmap/openstreetmap-website#3501) I opened #5970 specifically for JSON support for downloading changesets. I'm happy to attempt a PR if this idea is welcome -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website

[openstreetmap/openstreetmap-website] JSON support for /changeset/:id/download (Issue #5970)

2025-04-30 Thread Kyℓe Hensel via rails-dev
k-yle created an issue (openstreetmap/openstreetmap-website#5970) ### Problem - **As a** developer of web-based tools, - **I want** to avoid bundling a massive xml-parsing library just for a single API endpoint (since almost all others support JSON now) - **so that** the page loads faster, we a

Re: [openstreetmap/openstreetmap-website] update-wiki-pages: process ChangesetKey template (PR #5818)

2025-03-19 Thread Kyℓe Hensel via rails-dev
@k-yle pushed 1 commit. d2645df847f746aadab8dd13eb4e24ed836b4d28 update-wiki-pages: process ChangesetKey template -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5818/files/1bd348b1eb852e3f5618be78c4fdd52c887e8db9..d2645df847f746aadab8dd13eb4e24ed836b4d28 You

Re: [openstreetmap/openstreetmap-website] update-wiki-pages: process ChangesetKey template (PR #5818)

2025-03-19 Thread Kyℓe Hensel via rails-dev
@k-yle commented on this pull request. > @@ -8,6 +8,7 @@ use Pod::Usage; use MediaWiki::API; use Test::More qw(no_plan); use YAML::XS qw(Dump); +# NOTE: on macos, LWP::Protocol::https also needs to be installed thanks for the explaination, I've removed this comment -- Reply to this email d

[openstreetmap/openstreetmap-website] update-wiki-pages: process ChangesetKey template (PR #5818)

2025-03-18 Thread Kyℓe Hensel via rails-dev