-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update cause enum for alert #856
Conversation
2e22429
to
6a34178
Compare
@ErinLMoore if these are going to change, could you please update the GTFS documentation too? https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/reference.md#enum-cause |
Oops, I meant to link the MBTA GTFS docs for alerts. If the values are only changing in the API and not GTFS, it's fine not to update that. But in that case, we should still have a list of all the potential causes somewhere, since the API documentation links to the GTFS-RT Alert entity, but the causes in this enum are not listed in that specification |
These values come from the GTFS-RT enhanced field called "cause detail", which gets called "cause" in the API, and the actual "cause" field is dropped. In the GTFS, cause detail isn't defined as an enum, it's just a string. That's the reason none of these values have been in the GTFS docs. If you think it's a good idea, I can update the API docs to reflect that. |
e55af41
to
34cb9b1
Compare
These come from mbta/api#856
* fix: Handle unknown Alert Cause and Effect values * feat: Add new alert causes These come from mbta/api#856 * fix: Remove stray 9 Co-authored-by: Melody Horn <[email protected]> --------- Co-authored-by: Melody Horn <[email protected]>
Summary of changes
Asana Ticket: Update cause list in API repo
The hard-coded Cause enum used in alerts is outdated, this updates it to be the same as the enum we use in AlertsUI.
Feel free to assign this to a different reviewer as needed.