MobilityData / gtfs-realtime-validator

Java-based tool that validates General Transit Feed Specification (GTFS)-realtime feeds
Other
38 stars 9 forks source link

New Rule Proposal: TripUpdate has zero StopTimeUpdate entities #156

Closed evansiroky closed 1 year ago

evansiroky commented 1 year ago

Summary:

An error should be raised whenever a TripUpdate is encountered that has zero StopTimeUpdates when the trip is not marked as having a ScheduleRelationship of CANCELED or DUPLICATED.

Steps to reproduce:

Given a TripUpdate dataset and the dataset has a TripUpdate entity that has an empty trip.schedule_relationship field and a zero-length array of the stop_time_update field When when the validator checks this entity Then the validator should flag this TripUpdate entity as having an error for having a zero-length stop_time_update field.

Expected behavior:

The GTFS-Realtime Specification for the TripUpdate.stop_time_update field states that it is Conditionally required with the following description:

At least one stop_time_update must be provided for the trip unless the trip.schedule_relationship is CANCELED or DUPLICATED - if the trip is canceled, no stop_time_updates need to be provided. If the trip is duplicated, stop_time_updates may be provided to indicate real-time information for the new trip.

Observed behavior:

A rule may not be raised for this problem at this time.

Platform:

not verified, yet

evansiroky commented 1 year ago

Closing, I did not verify this error and did not see https://github.com/MobilityData/gtfs-realtime-validator/blob/master/RULES.md#E041.