Skip to content

feat: check station_information and station_status for corresponding station ids #189

Merged
davidgamez merged 3 commits intoMobilityData:masterfrom
mobidata-bw:validate_station_ids
Feb 2, 2026
Merged

feat: check station_information and station_status for corresponding station ids #189
davidgamez merged 3 commits intoMobilityData:masterfrom
mobidata-bw:validate_station_ids

Conversation

@hbruch
Copy link
Contributor

@hbruch hbruch commented Jan 29, 2026

This PR adds a "foreign key" reference check for station_information' and station_status' station_ids.

Besides the addition of rule NoInvalidReferenceToStation it fixes test fixtures which had inconsistent station_ids in their station_information and station_status feeds.

Motivation

The GBFS spec for versions greater or equal to v2.1 says:

Any station that is represented in station_status.json MUST have a corresponding entry in station_information.json.
and
Any station that is represented in station_information.json MUST have a corresponding entry in station_status.json.

Note: This PR includes this check for v2.2, v.2.3 and v3.0. If you agree with the implementation, I'd add it for v2.1 as well. v2.0 had this requirement not yet clearly spelled out, so I'd not add the validation for <=2.0.

@CLAassistant
Copy link

CLAassistant commented Jan 29, 2026

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@hbruch
Copy link
Contributor Author

hbruch commented Jan 30, 2026

Thanks for reviewing. I added validation for v.2.1. From my side, this PR is now ready to merge.

@davidgamez davidgamez merged commit 30a0df2 into MobilityData:master Feb 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants