196 station status or vehicle status should be required#198
Merged
jcpitre merged 3 commits intoJul 14, 2026
Conversation
jcpitre
deleted the
196-station_status-or-vehicle_status-should-be-required
branch
July 14, 2026 19:23
Collaborator
|
I should have noticed this sooner. This is a redundant check since we already validate this on the gbfs.json schema. The only thing that this PR adds is a check that they are reachable on the network. IMHO this adds unnecessary complexity for something that could fail for other reasons. I believe we discussed this on the tools contributor meeting. |
Contributor
Author
|
@testower we won't release until this is settled (or thrown out) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #196 — A GBFS feed must be dock-based, free-floating, or hybrid, meaning at least one of
station_status/vehicle_status(v3+) orstation_status/free_bike_status(pre-v3) must be present. Previously, the validator accepted feeds with neither file without reporting any error.Changes
GbfsJsonValidator: Added a post-validation check (checkStatusFilePresence) that flags both status files as conditionally required — with 1 error each — when neither is present in the feed.FileValidationResult: Added aconditionallyRequiredfield to distinguish between files that are always required by the spec and files that are required only when a counterpart is absent.ConsoleReportFormatter: Updated to display[CONDITIONALLY REQUIRED]instead of[REQUIRED]for these files.GbfsValidatorExampleto useLoaderfor feed discovery.Example
Running against https://opendata.agglo-larochelle.fr/sites/default/files/dataset/2dc/df9ac-ca89-4e3f-af7e-5d75f255ee5e/gbfs.json (the feed mentioned in #196) now produces:
⚠ station_status [CONDITIONALLY REQUIRED] - NOT FOUND
⚠ vehicle_status [CONDITIONALLY REQUIRED] - NOT FOUND
Result: INVALID