Skip to content

Commit

Permalink
Add GTFS Feed Version to the GTFS real time FeedHeader (#434)
Browse files Browse the repository at this point in the history
* Add feed_version and GTFS_url to FeedHeader.

* attributes should be lowercase

Co-authored-by: Antoine Augusti <[email protected]>

* Remove gtfs_url 

Remove the addition of gtfs_url because it wasn't clear if it should the current or upcoming file and it hasn't been implemented.

* Add feed_version description to referance.md

* Add backticks to key word.

Co-authored-by: Tzu-Jen Chan <[email protected]>

---------

Co-authored-by: Antoine Augusti <[email protected]>
Co-authored-by: Tzu-Jen Chan <[email protected]>
  • Loading branch information
3 people authored Dec 5, 2024
1 parent eb71ab1 commit 7b9f229
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gtfs-realtime/proto/gtfs-realtime.proto
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ message FeedHeader {
// January 1st 1970 00:00:00 UTC).
optional uint64 timestamp = 3;

// String that matches the feed_info.feed_version from the GTFS feed that the real
// time data is based on. Consumers can use this to identify which GTFS feed is
// currently active or when a new one is available to download.
optional string feed_version = 4;

// The extensions namespace allows 3rd-party developers to extend the
// GTFS Realtime specification in order to add and evaluate new features and
// modifications to the spec.
Expand Down
1 change: 1 addition & 0 deletions gtfs-realtime/spec/en/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Metadata about a feed, included in feed messages.
| **gtfs_realtime_version** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | Version of the feed specification. The current version is 2.0. |
| **incrementality** | [Incrementality](#enum-incrementality) | Required | One |
| **timestamp** | [uint64](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | This timestamp identifies the moment when the content of this feed has been created (in server time). In POSIX time (i.e., number of seconds since January 1st 1970 00:00:00 UTC). To avoid time skew between systems producing and consuming realtime information it is strongly advised to derive timestamp from a time server. It is completely acceptable to use Stratum 3 or even lower strata servers since time differences up to a couple of seconds are tolerable. |
| **feed_version** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | String that matches the `feed_info.feed_version` from the GTFS feed that the realtime data is based on. Consumers can use this to identify which GTFS feed is currently active or when a new one is available to download. |

## _enum_ Incrementality

Expand Down

0 comments on commit 7b9f229

Please sign in to comment.