Update event_type enum values to snake_case#247
Open
chrisyamas wants to merge 3 commits intodevelopfrom
Open
Conversation
Contributor
|
Documentation available at: |
Contributor
|
This may end up being a separate issue, but I notice that we have |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In addition to being a normative change (that requires data migration for existing TIDES implementations) this is also a breaking change. This change updates
passenger_events.event_typeenum values from 'Sentence case' with spaces to snake_case for improved code compatibility.Resolves #235
Changes
spec/passenger_events.schema.jsonupdatedevent_typeenum from Sentence case to snake_case. Note: In addition to the snake_case conversion, this PR also removes unnecessary characters/words from several of the enum values for the sake of conciseness. I am eager from TIDES Contributors for input on those modifications. Here are all enum value changes:Vehicle arrived at stop-->vehicle_arrived,Vehicle departed stop-->vehicle_departedDoor opened-->door_openedDoor closed-->door_closedPassenger boarded-->passenger_boardedPassenger alighted-->passenger_alightedKneel was engaged-->kneel_engagedKneel was disengaged-->kneel_disengagedRamp was deployed-->ramp_deployedRamp was raised-->ramp_raisedRamp deployment failed-->ramp_failedLift was deployed-->lift_deployedLift was raised-->lift_raisedIndividual bike boarded-->bike_boardedIndividual bike alighted-->bike_alightedBike rack deployed-->bike_rack_deployedCHANGELOG.mdadded BREAKING change entry under[Unreleased]sectionReason for this change
The original 'Sentence case' enum values with spaces (e.g.,
"Vehicle arrived at stop") create unnecessary friction for some data manipulation operations in code. Values formatted in this way must be quoted in queries, cannot be used as variable names, and require case handling.The new snake_case format (
vehicle_arrived) will yield improvements including:WHEREclauses- For reference, see related discussion in Issue #235 and Fall 2025 TIDES Issues Working Group notes from December 1 and December 10.
Review checklist
Per change management policy, the following must be met before feature branch changes can merge to
developbranch: