public-transport/gtfs-via-postgres

Single-agency feeds without `agency_id` are rejected

Open

#73 opened on Aug 31, 2025

View on GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (21 forks)github user discovery
buggood first issuehelp wanted

Repository metrics

Stars
 (141 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

In the GTFS spec, the agency_id field in agency.txt is conditionally required:

  • Required when the dataset contains data for multiple transit agencies.
  • Recommended otherwise.

Current behaviour: Single-agency feeds without agency_id are rejected, because agency_id is enforced as a primary key in lib/agency.js.

https://github.com/public-transport/gtfs-via-postgres/blob/cd8fe457fe1583b97aaee5e9fcfae1771ca4c938/lib/agency.js#L6C2-L6C29

Expected behaviour: Single-agency feeds without agency_id should be accepted as per the GTFS spec.

Contributor guide