gtfs-validator
gtfs-validator copied to clipboard
Flex: Update stop schema and add missing_stop_id rule
Describe the problem
In order to support Flex as a part of https://github.com/MobilityData/gtfs-validator/issues/1721, we need to
- modify the stop schema so stop_id is no longer a required field
- add a new rule for missing_stop_id and checks for ids across stop_id, location_group_id, and locations.id
Proposed solution
- Test to check that missing_required_field is no longer triggered when stop_id is not provided
- Add new missing_stop_id rule. Test with no-stop-id-for-trip-t_5735996_b_81516_tn_0.zip I removed the stop_id associated with the trip_id t_5735996_b_81516_tn_0 in stop_times.txt from https://data.trilliumtransit.com/gtfs/islandtransit-wa-us/islandtransit-wa-us--flex-v2-TEST.zip to test this.
- In depth review of acceptance test results, given the widespread implications of this change
File name | Spec language | Notice to update or add | Validator logic | Notice table columns |
stops.txt, location_groups.txt, locations.geojson | In stops.txt:
stop_id In stop_times.txt: |
New notice to address use case that was previously covered in missing_required_field:
missing_stop_id |
ERROR:
Generate if there is no stop_id, location_group_id, OR location_id
|
lineNumber and tripId |
Alternatives you've considered
No response
Additional context
This seems to be the most substantial change to the previous files and requirements of the spec from the new Flex changes. We're curious to hear from consumers about this modification and the work required for them to incorporate this change.
Tasks:
- [ ] Investigate if it's possible to keep the same missing required field notice in case of non-flex feeds
After further clarification, this change is not required. stop_id
is still required in all cases where stops.txt
is still provided. The decision to define stops.txt
as conditionally required is an ongoing discussion in the spec: https://github.com/google/transit/issues/452