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": [
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
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]
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
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
@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/#
@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
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
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
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
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
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
@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
@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