-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gbfs.json: allow relative URLs to other files #544
Comments
I think this is an interesting proposal. Would love to avoid having to manipulate URLs in the aggregation layer. Consumer support is definitely a potential issue so curious to hear what the community has to say. |
I can only speak for OTP as a consumer, but if it makes the producers lives easier (and two already said so), then I would be okay with changing the implementation. Interesting fact: we already allow file: URLs in OTP because we use that for unit tests. It's undocumented though. |
Thank you @derhuerst for this contribution. Relative URLs is a very interesting topic. Tagging recent contributors for visibility: @cmonagle @viestat @ArashMansouri @AntoineAugusti @ezmckinn @fbouchPBSC @Carl-NM @bdferris-v2 @kulovan @gajayraghav @hynick4 @PierrickP @tdelmas @tobsesHub @tstrubel @HannesOlszewski @simonsolnes @futuretap |
To have work in both the consumer and producer side, I would say:
Also, the current specification specifies "All endpoints MUST use HTTPS" (so the
If it's accepted, it must be clearly documented (ideally a well known producer should implement it, to drive consumers) |
I would be against this, it makes life more complicated on the consumer side. There are more consumers than producers. Providing stable URLs shouldn't be too hard for producers and relative URLs are subject to interpretation/implementation (relative to the base domain, current path, |
After reviewing some of these comments and discussing at the North America workshops last week, I'm leaning towards not supporting this proposal. Anything that makes consuming GBFS more complicated is not great, especially by introducing ambiguity about where to find feeds. |
I'm against this, would make life on the consumer side more challenging. Also, as @tdelmas pointed out, there could be edge cases involving redirects of the root feed which are actually pretty common. |
I don't have a strong opinion on this, from the Producer side. It is not likely that we implement relative URLs or change our web domain soon, so even if it were allowed, we would be unlikely to implement. |
This discussion has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
still relevant |
This discussion has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
still relevant |
@derhuerst can't you just create a PR and ask for a vote? Just defending staleness by posting "still relevant" doesn't help anyone. I'm against this, as written above, but let the community decide! |
This discussion has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
This discussion has been closed due to inactivity. Discussions can always be reopened after they have been closed. |
If you are new to the specification, please introduce yourself (name and organization/link to GBFS). It’s helpful to know who we're chatting with!
Hey, I'm Jannis, mostly active in the GTFS realm, but occasionally I work with shared mobility data. I'm passionate about the web and all things open (open data, open source, etc.)!
What is the issue and why is it an issue?
I originally brought this question up in the (old) PR introducing
gbfs.json
.The spec currently defines
gtfs.json
'surl
field as being of the type URL, which in turn is defined as follows:I interpet this as follows:
http(s)://
, which I interpret as "its scheme must behttp(s):
". – Even if we don't adopt the quite technical "scheme" term, I think it would be more precise to say that it should begin withhttp():
.I would argue strongly in favour of explicitly allowing relative URLs, given that they make a GBFS feed (the set of files) much more portable and less brittle, because it's "common path" can be changed (a.k.a. it can be moved within or across web servers) without having to modify the files.
While consuming some GBFS feeds in Germany, I've noticed that a) a feed provider got their absolute URLs wrong (so that the feed is invalid), and b) that mirroring or fixing and republishing (which is the sad reality given the frequent bugs in feeds) is cumbersome because one has to adapt all absolute URLs.
A bonus of using relative URLs: It would also allow consuming a GBFS feed via the
file:
URL scheme, making tools (e.g. OTP or Lamassu) more user-friendly.Is your potential solution a breaking change?
I may break some consumers, given that they don't resolve relative URLs.
For a discussion about using IRIs/IRLs instead of URLs, see #543.
The text was updated successfully, but these errors were encountered: