From 39eaf22280aa28afc6532908b9d9116e995fe9a3 Mon Sep 17 00:00:00 2001 From: ibi-group-team Date: Wed, 16 Jan 2019 11:52:57 -0500 Subject: [PATCH 1/4] Update .proto and documentation for new severity_level field --- gtfs-realtime/proto/gtfs-realtime.proto | 10 ++++++++++ gtfs-realtime/spec/en/reference.md | 14 ++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 76057b9d4..57b41a11a 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -427,6 +427,16 @@ message Alert { // Full description for the alert as plain-text. The information in the // description should add to the information of the header. optional TranslatedString description_text = 11; + + //Severity of this alert. + enum SeverityLevel { + UNKNOWN_SEVERITY = 1; + INFORMATIONAL = 2; + WARNING = 3; + SEVERE = 4; + } + + optional SeverityLevel severity_level = 12 [default = UNKNOWN_SEVERITY]; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index a4a918809..48680f51f 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -66,6 +66,7 @@ Fields labeled as **experimental** are subject to change and not yet formally ad * [Effect](#enum-effect) * [TranslatedString](#message-translatedstring) * [Translation](#message-translation) + * [SeverityLevel](#enum-severitylevel) # Elements @@ -265,6 +266,7 @@ An alert, indicating some sort of incident in the public transit network. | **url** | [TranslatedString](#message-translatedstring) | Optional | One | The URL which provides additional information about the alert. | | **header_text** | [TranslatedString](#message-translatedstring) | Required | One | Header for the alert. This plain-text string will be highlighted, for example in boldface. | | **description_text** | [TranslatedString](#message-translatedstring) | Required | One | Description for the alert. This plain-text string will be formatted as the body of the alert (or shown on an explicit "expand" request by the user). The information in the description should add to the information of the header. | +| **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert. | ## _enum_ Cause @@ -305,6 +307,18 @@ The effect of this problem on the affected entity. | **UNKNOWN_EFFECT** | | **STOP_MOVED** | +## _enum_ SeverityLevel + +The severity of the alert. + +#### Values +| _**Value**_ | +|-------------| +| **UNKNOWN_SEVERITY** | +| **INFORMATIONAL** | +| **WARNING** | +| **SEVERE** | + ## _message_ TimeRange A time interval. The interval is considered active at time `t` if `t` is greater than or equal to the start time and less than the end time. From f50e3eb29d551a6d5fc3df63691263179d22dd54 Mon Sep 17 00:00:00 2001 From: ibi-group-team Date: Tue, 22 Jan 2019 14:17:05 -0500 Subject: [PATCH 2/4] Change INFORMATIONAL enum value to INFO --- gtfs-realtime/proto/gtfs-realtime.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 57b41a11a..e9ac0e47a 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -428,10 +428,10 @@ message Alert { // description should add to the information of the header. optional TranslatedString description_text = 11; - //Severity of this alert. + // Severity of this alert. enum SeverityLevel { UNKNOWN_SEVERITY = 1; - INFORMATIONAL = 2; + INFO = 2; WARNING = 3; SEVERE = 4; } From a4bcb1f7c6157ac4474f16a199cd0c118625e441 Mon Sep 17 00:00:00 2001 From: ibi-group-team Date: Wed, 23 Jan 2019 12:03:05 -0500 Subject: [PATCH 3/4] Mark field as experimental --- gtfs-realtime/proto/gtfs-realtime.proto | 3 ++- gtfs-realtime/spec/en/reference.md | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index e9ac0e47a..05d7255d9 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -428,7 +428,8 @@ message Alert { // description should add to the information of the header. optional TranslatedString description_text = 11; - // Severity of this alert. + // Severity of this alert. This field is still experimental, + // and subject to change. It may be formally adopted in the future. enum SeverityLevel { UNKNOWN_SEVERITY = 1; INFO = 2; diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 48680f51f..2b1bd3cbb 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -266,7 +266,7 @@ An alert, indicating some sort of incident in the public transit network. | **url** | [TranslatedString](#message-translatedstring) | Optional | One | The URL which provides additional information about the alert. | | **header_text** | [TranslatedString](#message-translatedstring) | Required | One | Header for the alert. This plain-text string will be highlighted, for example in boldface. | | **description_text** | [TranslatedString](#message-translatedstring) | Required | One | Description for the alert. This plain-text string will be formatted as the body of the alert (or shown on an explicit "expand" request by the user). The information in the description should add to the information of the header. | -| **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert. | +| **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert.
**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | ## _enum_ Cause @@ -311,11 +311,13 @@ The effect of this problem on the affected entity. The severity of the alert. +**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. + #### Values | _**Value**_ | |-------------| | **UNKNOWN_SEVERITY** | -| **INFORMATIONAL** | +| **INFO** | | **WARNING** | | **SEVERE** | From 2596c8e8df05539b2f9f10febe035197af311cd6 Mon Sep 17 00:00:00 2001 From: ibi-group-team Date: Fri, 25 Jan 2019 12:59:45 -0500 Subject: [PATCH 4/4] Fix formatting --- gtfs-realtime/proto/gtfs-realtime.proto | 4 ++-- gtfs-realtime/spec/en/reference.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 05d7255d9..d2166dcd2 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -428,8 +428,8 @@ message Alert { // description should add to the information of the header. optional TranslatedString description_text = 11; - // Severity of this alert. This field is still experimental, - // and subject to change. It may be formally adopted in the future. + // Severity of this alert. + // This field is still experimental, and subject to change. It may be formally adopted in the future. enum SeverityLevel { UNKNOWN_SEVERITY = 1; INFO = 2; diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 2b1bd3cbb..4903e7314 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -66,7 +66,7 @@ Fields labeled as **experimental** are subject to change and not yet formally ad * [Effect](#enum-effect) * [TranslatedString](#message-translatedstring) * [Translation](#message-translation) - * [SeverityLevel](#enum-severitylevel) + * [SeverityLevel](#enum-severitylevel) # Elements