Skip to content

Validate vehicle type references across GBFS feeds - #218

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

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
@richfab

richfab commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Hello @mackenziereading19,

Thank you for contributing to the GBFS validator!

Sorry for the delayed response.

As explained in #217, I think that if we add object dependency relationships validation, we should do it for all objects.

I will check internally with MobilityData IT team how we can help with this. Please note that this Javascript validator will progressively be replaced by this one in Java: https://github.com/MobilityData/gbfs-validator-java.

Best regards,
Fabien (MobilityData)

cc @davidgamez @emmambd

@richfab

richfab commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Hello @mackenziereading19,

Thank you for your contribution to the JavaScript validator.

As explained in #217, we want to refrain from approving PRs with partial fixes, since we won't have time to follow up and complete them.

For now, I will close this PR, the conversation continues in #153.

Please don't hesitate if you have any questions.

Thank you!
Fabien (MobilityData)

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.

3 participants