etalab / transport-validator

GTFS validator
https://transport.data.gouv.fr/validation/
MIT License
38 stars 10 forks source link

routes.agency_id: add check #146

Open AntoineAugusti opened 2 years ago

AntoineAugusti commented 2 years ago

This condition is not enforced at the moment.

Agency for the specified route. This field is required when the dataset provides data for routes from more than one agency in agency.txt, otherwise it is optional.

From routes.txt

antoine-de commented 2 years ago

This could be related to https://github.com/rust-transit/gtfs-structure/pull/126 since the typed ids would enforce all ids to be valid.

But there is still a bit of work on the PR and I'm not sure when i'll be able to work on it

fchabouis commented 2 years ago

We could just add a check that if there are more than one agency, agency_id must be present. If not, we can outpout an Error.

AntoineAugusti commented 2 years ago

@fchabouis What I had in mind