Skip to content
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

auto discovery: support relative URLs #238

Closed
derhuerst opened this issue Sep 5, 2023 · 3 comments
Closed

auto discovery: support relative URLs #238

derhuerst opened this issue Sep 5, 2023 · 3 comments
Labels
question Further information is requested

Comments

@derhuerst
Copy link
Contributor

As of 3.0-RC, the GBFS spec merely defines the url field as "URL for the feed […]". It does not limit the field to absolute URLs, so my interpretation is that relative URLs (e.g. system_information.json, ./system_information.json or ../foo/system_information.json) should be valid.

I have also asked in the GBFS repo to clarify this: MobilityData/gbfs#189 (comment)

{
  "data": {
    "en": {
      "feeds": [
        {
          "name": "system_information",
          "url": "./system_information.json"
        },
        // …
      ]
    }
  },
  // …
}

With the example above, Lamassu currently seems to fail fetching the feed with the following log message:

{
	"serviceContext": {
		"service": "lamassu"
	},
	"message": "Failed to setup subscription, trying again in 5 seconds - systemId=deer\n",
	"reportLocation": {
		"filePath": "org.entur.lamassu.leader.FeedUpdater",
		"lineNumber": "130",
		"functionName": "createSubscription"
	},
	"severity": "WARNING"
}
@testower
Copy link
Collaborator

testower commented Sep 6, 2023

Thanks - I'll await the clarification on the spec. I have never expected it to work the way you suggest.

@futuretap
Copy link

We’ve interpreted the spec to require absolute URLs and don’t support relative URLs in our consumer code. We’re also not aware of any producer publishing relative URLs.

@testower testower added the question Further information is requested label Sep 16, 2023
@testower
Copy link
Collaborator

It seems unlikely that this will be added in the spec, but in the event that it does, this issue may be reopened.

@testower testower closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants