From 98d97d023c18fc05ae06f585dd25f2c3dc8a6244 Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Thu, 20 Dec 2018 16:03:22 -0500 Subject: [PATCH 1/2] Define valid GTFS-realtime version numbers * gtfs_realtime_version is a string in the Protocol Buffer gtfs-realtime.proto file, and therefore producers can populate this field with a number of different possible values. Previously, the exact GTFS-realtime version format hasn't been explicitly defined anywhere, and as a result producers have published a variety of interpretations (e.g., 1.0, 1) * This proposal strictly defines what the allowed GTFS-realtime version numbers are so that consumers can do exact string matching to determine which GTFS-realtime version the producer is publishing --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- gtfs-realtime/spec/en/examples/alerts.asciipb | 2 +- gtfs-realtime/spec/en/examples/trip-updates-full.asciipb | 2 +- gtfs-realtime/spec/en/reference.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 76057b9d4..ebbb6f59e 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -51,7 +51,7 @@ message FeedMessage { // Metadata about a feed, included in feed messages. message FeedHeader { // Version of the feed specification. - // The current version is 2.0. + // The current version is 2.0. Valid versions are 2.0, 1.0. required string gtfs_realtime_version = 1; // Determines whether the current fetch is incremental. Currently, diff --git a/gtfs-realtime/spec/en/examples/alerts.asciipb b/gtfs-realtime/spec/en/examples/alerts.asciipb index 601bfd061..5cd8db226 100644 --- a/gtfs-realtime/spec/en/examples/alerts.asciipb +++ b/gtfs-realtime/spec/en/examples/alerts.asciipb @@ -1,6 +1,6 @@ # header information header { - # version of speed specification. Currently "2.0" + # version of speed specification. Currently "2.0". Valid versions are 2.0, 1.0. gtfs_realtime_version: "2.0" # determines whether dataset is incremental or full diff --git a/gtfs-realtime/spec/en/examples/trip-updates-full.asciipb b/gtfs-realtime/spec/en/examples/trip-updates-full.asciipb index 3dd58a988..0947d9739 100644 --- a/gtfs-realtime/spec/en/examples/trip-updates-full.asciipb +++ b/gtfs-realtime/spec/en/examples/trip-updates-full.asciipb @@ -1,6 +1,6 @@ # header information header { - # version of speed specification. Currently "2.0" + # version of speed specification. Currently "2.0". Valid versions are 2.0, 1.0. gtfs_realtime_version: "2.0" # determines whether dataset is incremental or full incrementality: FULL_DATASET diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index a4a918809..bc640c853 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -1,6 +1,6 @@ A GTFS Realtime feed lets transit agencies provide consumers with realtime information about disruptions to their service (stations closed, lines not operating, important delays, etc.) location of their vehicles, and expected arrival times. -Version 2.0 of the feed specification is discussed and documented on this site. +Version 2.0 of the feed specification is discussed and documented on this site. Valid versions are 2.0, 1.0. ### Term Definitions From 2ee02e7b9466fcb659bf43280516809c8f0679e3 Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Mon, 7 Jan 2019 09:35:06 -0500 Subject: [PATCH 2/2] Add quotes around versions to make it clear they are string types Per comment https://github.com/google/transit/pull/130/files#r243454003 --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- gtfs-realtime/spec/en/examples/alerts.asciipb | 2 +- gtfs-realtime/spec/en/examples/trip-updates-full.asciipb | 2 +- gtfs-realtime/spec/en/reference.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index ebbb6f59e..78a0d038d 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -51,7 +51,7 @@ message FeedMessage { // Metadata about a feed, included in feed messages. message FeedHeader { // Version of the feed specification. - // The current version is 2.0. Valid versions are 2.0, 1.0. + // The current version is 2.0. Valid versions are "2.0", "1.0". required string gtfs_realtime_version = 1; // Determines whether the current fetch is incremental. Currently, diff --git a/gtfs-realtime/spec/en/examples/alerts.asciipb b/gtfs-realtime/spec/en/examples/alerts.asciipb index 5cd8db226..b30316e54 100644 --- a/gtfs-realtime/spec/en/examples/alerts.asciipb +++ b/gtfs-realtime/spec/en/examples/alerts.asciipb @@ -1,6 +1,6 @@ # header information header { - # version of speed specification. Currently "2.0". Valid versions are 2.0, 1.0. + # version of speed specification. Currently "2.0". Valid versions are "2.0", "1.0". gtfs_realtime_version: "2.0" # determines whether dataset is incremental or full diff --git a/gtfs-realtime/spec/en/examples/trip-updates-full.asciipb b/gtfs-realtime/spec/en/examples/trip-updates-full.asciipb index 0947d9739..fe0755c68 100644 --- a/gtfs-realtime/spec/en/examples/trip-updates-full.asciipb +++ b/gtfs-realtime/spec/en/examples/trip-updates-full.asciipb @@ -1,6 +1,6 @@ # header information header { - # version of speed specification. Currently "2.0". Valid versions are 2.0, 1.0. + # version of speed specification. Currently "2.0". Valid versions are "2.0", "1.0". gtfs_realtime_version: "2.0" # determines whether dataset is incremental or full incrementality: FULL_DATASET diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index bc640c853..16c377f40 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -1,6 +1,6 @@ A GTFS Realtime feed lets transit agencies provide consumers with realtime information about disruptions to their service (stations closed, lines not operating, important delays, etc.) location of their vehicles, and expected arrival times. -Version 2.0 of the feed specification is discussed and documented on this site. Valid versions are 2.0, 1.0. +Version 2.0 of the feed specification is discussed and documented on this site. Valid versions are "2.0", "1.0". ### Term Definitions