Skip to content

Validate vehicle type references across GBFS feeds - #218

Open
mackenziereading19 wants to merge 1 commit into
MobilityData:masterfrom
mackenziereading19:fix/217-vehicle-type-references
Open

Validate vehicle type references across GBFS feeds#218
mackenziereading19 wants to merge 1 commit into
MobilityData:masterfrom
mackenziereading19:fix/217-vehicle-type-references

Conversation

@mackenziereading19

Copy link
Copy Markdown

Fixes a subset of #217.

This adds cross-file validation ensuring vehicle_type_id values in free_bike_status.json / vehicle_status.json resolve to IDs defined in vehicle_types.json.

The check is applied across supported GBFS versions v2.1, v2.2, v2.3, v3.0 and v3.1-RC3.

Existing conditional behaviour requiring current_range_meters for motorized vehicle types is preserved.

A regression fixture demonstrates the previous false negative in GBFS v3.0, where an undefined vehicle_type_id passed validation without errors.

Tests

  • full validator suite: 34 passed;
  • snapshots: 7 passed;
  • v3.0 undefined-reference regression: passed;
  • structural checks across v2.1/v2.2/v2.3/v3.0/v3.1-RC3: passed.

This intentionally does not yet address the other cross-file ID relationships mentioned in #217, such as station, pricing-plan or geofencing references.

@netlify

netlify Bot commented Aug 23, 2026

Copy link
Copy Markdown

👷 Deploy request for gbfs-validator pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 0c1829c

@CLAassistant

CLAassistant commented Aug 23, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@emmambd
emmambd requested a review from richfab September 1, 2026 17:02
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.

2 participants