Re: [openstreetmap/openstreetmap-website] Allow getting a GPX in the browser outside openstreetmap.org (Issue #5639)

2025-02-10 Thread Harel M via rails-dev
Here's an example of a call to get the data of one of my traces: Running the following code in the browser console when surfing to https://israelhiking.osm.org.il/: ```js fetch("https://api.openstreetmap.org/api/0.6/gpx/4192873/data";).then(r => r.text()).then(console.log) ``` ![Image](https://g

Re: [openstreetmap/openstreetmap-website] Allow getting a GPX in the browser outside openstreetmap.org (Issue #5639)

2025-02-10 Thread Harel M via rails-dev
Thanks for looking into this and for the super quick response as usual! If there's more information I can provide or otherwise help, do let me know. Relaxing the CORS sounds like the right direction. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreet

[openstreetmap/openstreetmap-website] Add support for json response for `/api/0.6/user/gpx_files` endpoint (Issue #5646)

2025-02-10 Thread Harel M via rails-dev
### Problem Client side javascript parsing for xml isn't great (although possible). ### Description It would be great to have json support for the `/api/0.6/user/gpx_files` endpoint like other supported json responses. ### Screenshots N/A. -- Reply to this email directly or view it on GitH

Re: [openstreetmap/openstreetmap-website] OAuth2 login flow returns error 500 (Issue #5400)

2024-12-16 Thread Harel M via rails-dev
Thanks for the link @HolgerJeromin! I thought that the fact that I can see the openstreetmap.org site means the failure was resolved, but I now learned that it's in read-only mode. I'll wait patiently for the resolution. Thanks for all the hard work around OSM, it is very much appreciated! Keep i

[openstreetmap/openstreetmap-website] OAuth2 login flow returns error 500 (Issue #5400)

2024-12-15 Thread Harel M via rails-dev
### URL Https://israelhiking.osm.org.il ### How to reproduce the issue? This is a standard login flow from a third party app: 1. Go to israelhiking.osm.org.il 2. Click the sad face after the intro screen to login 3. Enter osm credentials where needed 4. Approve the scope 5. See the error ### Sc

[openstreetmap/openstreetmap-website] Allow getting a GPX in the browser outside openstreetmap.org (Issue #5639)

2025-02-09 Thread Harel M via rails-dev
### Problem My site (and app) are uploading the recording to OSM by default to enrich OSM with the data people are collecting. I would like to avoid the need to go through my backend to fetch a GPX file (private one). Currently the api returns a 302 redirect, which can't be handled by the browse

Re: [openstreetmap/openstreetmap-website] Added JSON response format support for /api/0.6/user/gpx_files endpoint (PR #5779)

2025-04-18 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5779) Is there a way I can push this forward? I'd like to use this feature, so I'll be happy to help out. I don't mind opening a new PR with the same changes if that's what's needed (to solve the merge commits), but I'm not sure I unders

Re: [openstreetmap/openstreetmap-website] Added JSON response format support for /api/0.6/user/gpx_files endpoint (PR #5779)

2025-04-17 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5779) Ahh, interesting, was not aware of this endpoint... -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5779#issuecomment-2813792066 You are receiving this because you a

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5943) Thanks for the review, I'll look into addressing the issues. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943#issuecomment-2822085243 You are receiving this beca

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread Harel M via rails-dev
@HarelM pushed 1 commit. 65a6aae9788062d3987f8747b6c792584e002824 Update app/controllers/api/traces_controller.rb -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943/files/7c055537b93648ad89a41892e5a6ff2fdb48cf1d..65a6aae9788062d3987f8747b6c792584e002824 You

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread Harel M via rails-dev
@HarelM pushed 1 commit. 6b78ddd4d4a3509065a0df20561d12a2940d44c4 Add format to test where it was missing -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943/files/b8da5fcb1bc8164007dcc97db30204f25bf903ff..6b78ddd4d4a3509065a0df20561d12a2940d44c4 You are rece

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5943) Ah, I wasn't expecting this file to contain this information, cool, thanks, looks like this is what I was looking for. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pu

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5943) Thanks for the info regarding the `before_action`. I'll see how I can improve the git history once everything is passing. BTW, why not simply use squash merge? -- Reply to this email directly or view it on GitHub: https://github.c

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5943) Sure, I'll try and squash everything to a single commit, hopefully easier... -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943#issuecomment-2822539298 You are rec

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread Harel M via rails-dev
@HarelM pushed 1 commit. b6d5339f7e7df11ecb0845f8fd036d45ba8b719e Add missing request formats definition -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943/files/6b78ddd4d4a3509065a0df20561d12a2940d44c4..b6d5339f7e7df11ecb0845f8fd036d45ba8b719e You are receiv

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread Harel M via rails-dev
@HarelM pushed 1 commit. b8da5fcb1bc8164007dcc97db30204f25bf903ff Added routing and json tests -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943/files/42e841c31dc9b006b0fe1a6ba7eaa4413b9da5f3..b8da5fcb1bc8164007dcc97db30204f25bf903ff You are receiving this b

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5943) Ok. Everything should be in a single commit now. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943#issuecomment-2822572244 You are receiving this because you are

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread Harel M via rails-dev
@HarelM pushed 1 commit. e4709176c2ec0ff8100f1c039ffb35f1a7b68533 Fix rubocop errors -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943/files/65a6aae9788062d3987f8747b6c792584e002824..e4709176c2ec0ff8100f1c039ffb35f1a7b68533 You are receiving this because you

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread Harel M via rails-dev
@HarelM pushed 1 commit. 42e841c31dc9b006b0fe1a6ba7eaa4413b9da5f3 Remove unneeded content type definition -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943/files/e4709176c2ec0ff8100f1c039ffb35f1a7b68533..42e841c31dc9b006b0fe1a6ba7eaa4413b9da5f3 You are rece

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread Harel M via rails-dev
@HarelM 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 => "a

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-23 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5943) I kept the traces as and array of objects, each one of them a trace, but without the `{ trace: { ... } }`, was your comment about including the `trace` property for every trace in the array intentional? Regardless, this is now rea

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-23 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5943) These cycles are too long, I'll work on trying to run this locally and make sure the tests pass... -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943#issuecomment

Re: [openstreetmap/openstreetmap-website] Support Sign in with Apple (#2799)

2025-05-02 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#2799) Below is the message that I got from Apple today. I generally **think** that OSM adheres to the requirements, but I think Apple is pushing to allow their login by rejecting application and making the developers (like me) try and pu

Re: [openstreetmap/openstreetmap-website] Support Sign in with Apple (#2799)

2025-05-02 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#2799) My use case is an app that runs capacitor and opens a secured browser season for OSM login. You can check it out here if you'd like: Https://israelhiking.osm.org.il/ This will prompt you to install the app, which you can try the lo

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-24 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5943) I wanted to see that it is deployed first, but sure, I've updated the wiki page. As a side note, wouldn't it be easier to simply generate an openAPI/swagger page that is generated from the code itself to avoid mismatches? -- Repl

Re: [openstreetmap/openstreetmap-website] Allow getting a GPX in the browser outside openstreetmap.org (Issue #5639)

2025-04-25 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5639) I'm not sure this is a different problem or not, but I'm also unable to get the trace's icon using Oauth2 header, i.e: https://www.openstreetmap.org/user/Harel%20M/traces/11959548/icon With the header of Authorization: Bearer . I d

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-23 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5943) Thanks for the info! I'll look into aligning those so that it will return in a similar way. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943#issuecomment-282511

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-23 Thread Harel M via rails-dev
@HarelM pushed 1 commit. 3282a4cf3c0ba08b91930ecc26a84aa7a1632524 Change json structure -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943/files/f68891fc0b865c0feb4ec78d640528feb71ec25f..3282a4cf3c0ba08b91930ecc26a84aa7a1632524 You are receiving this because

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-23 Thread Harel M via rails-dev
@HarelM pushed 1 commit. f68891fc0b865c0feb4ec78d640528feb71ec25f Apply suggestions from code review -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943/files/bd886baa110042deef226f01ada411960a1a2d74..f68891fc0b865c0feb4ec78d640528feb71ec25f You are receiving

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-23 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5943) I've changed the structure according to what suggested. Sorry for being a noob :-/ Unfortunately, when running the docker CI code on my mac not all the tests pass, so I'm having a hard time running the tests locally before I commit.

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-23 Thread Harel M via rails-dev
@HarelM pushed 1 commit. 10d9ede3b85b31f699826fcd7f8b7aa72ae28f26 Fix typo in show json. -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943/files/3282a4cf3c0ba08b91930ecc26a84aa7a1632524..10d9ede3b85b31f699826fcd7f8b7aa72ae28f26 You are receiving this because

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-23 Thread Harel M via rails-dev
@HarelM pushed 1 commit. 2dfd922598c216aafbbed7257578a5b8704a6dca Add tags testing to json -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943/files/b5bcdba346fc5239acde1e4326db6f8683680c57..2dfd922598c216aafbbed7257578a5b8704a6dca You are receiving this becau

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-23 Thread Harel M via rails-dev
@HarelM pushed 1 commit. b5bcdba346fc5239acde1e4326db6f8683680c57 Update app/controllers/api/traces_controller.rb -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943/files/1c7cad22805e5aa6806b69e17d12e19fe8dc365c..b5bcdba346fc5239acde1e4326db6f8683680c57 You

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-23 Thread Harel M via rails-dev
@HarelM commented on this pull request. > +assert_equal trace1.id, js["traces"][0]["id"] +assert_equal trace2.id, js["traces"][1]["id"] Added checks. Let me know if anything is missing. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/ope

Re: [openstreetmap/openstreetmap-website] Documenting API using Swagger / rswag (#3107)

2025-04-24 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#3107) +1 for swagger/openAPI generated docs instead of a wiki maintenance, see my comment here: https://github.com/openstreetmap/openstreetmap-website/pull/5943. In general, now that OSM backend supports Oauth2 token, one can set this to

Re: [openstreetmap/openstreetmap-website] Allow getting a GPX in the browser outside openstreetmap.org (Issue #5639)

2025-04-24 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5639) Any updates on this? Is there anyway I can help? I'm removing part of my backend that are only a passthrough to OSM API and this is still a problem unfortunately when running from the browser... -- Reply to this email directly or

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5943) I've added some tests according to what I saw in other controllers' tests. Let me know if more tests are needed. As to contributing, I think it's missing some explanation of default users that are automatically created and how to l

Re: [openstreetmap/openstreetmap-website] Support Sign in with Apple (#2799)

2025-05-02 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#2799) @tomhughes is the gap here are only the 79 EU a year or are there still technical issues preventing this from getting completed? I use OSM login for my app in the app store and it keeps getting rejection due to missing Apple login

Re: [openstreetmap/openstreetmap-website] Support Sign in with Apple (#2799)

2025-05-02 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#2799) That's a valid point, and I can totally respect that, but I'm mainly trying to get my life easier since I need to respond every time they reject my app :-/ I can reframe that implementing this would be helpful to my app and thus to

Re: [openstreetmap/openstreetmap-website] Support Sign in with Apple (#2799)

2025-05-03 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#2799) That's partially true. Implementing this will reduce the friction, and allow a smoother review of my app, that uses OSM as the provider for user login. Since my app is basically a webview wrapped in native code, adding this feature

Re: [openstreetmap/openstreetmap-website] Added JSON response format support for /api/0.6/user/gpx_files endpoint (PR #5779)

2025-04-21 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5779) I've created another PR here: - #5943 I'm extremely out of my comfort zone as I have never written a single line in ruby or ruby on rails... Never-the-less, I'm willing to invest the time to see this through. -- Reply to this ema

[openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-21 Thread Harel M via rails-dev
### Description This adds support for json for traces API (both for `index` and `show`). This PR is to replace #5779. To copy from the PR initial post there: This PR adds JSON format support to the user's GPX files API endpoint, enhancing the API's flexibility and consistency with other endpoint

Re: [openstreetmap/openstreetmap-website] Allow getting a GPX in the browser outside openstreetmap.org (Issue #5639)

2025-03-01 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5639) Should I be opening a different issue or should this issue be reopened? -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5639#issuecomment-2692427652 You are receiv

Re: [openstreetmap/openstreetmap-website] Add support for json response for `/api/0.6/user/gpx_files` endpoint (Issue #5646)

2025-03-08 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5646) Thanks for looking into this @Satya900! You can link the issue from the PR as well to automatically close this issue when the PR is merged (by adding a comment on the PR main message with "resolves #xxx" -- Reply to this email di

Re: [openstreetmap/openstreetmap-website] Allow getting a GPX in the browser outside openstreetmap.org (Issue #5639)

2025-02-23 Thread Harel M via rails-dev
HarelM left a comment (openstreetmap/openstreetmap-website#5639) Thanks for looking into this! I'm still getting the same error message as above though. I'm testing this from the browser console when the site https://israelhiking.osm.org.il and I'm running the following fetch (using my OAuth2 he