Update routeID to be routeNumber in \tracking for consistency#295
Merged
Conversation
raahimenon
approved these changes
Apr 12, 2020
Contributor
raahimenon
left a comment
There was a problem hiding this comment.
everything looks good to me
kevinchan159
approved these changes
Apr 12, 2020
| } | ||
|
|
||
| return Object.values(vehicles).find(v => v.routeID === routeID && v.tripID === tripID); | ||
| const vehicleData = Object.values(vehicles).find(v => parseInt(v.routeID) === routeNumber && v.tripID === tripID); |
Contributor
There was a problem hiding this comment.
maybe split this into multiple lines
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.
Overview
Right now
/trackingrequiresrouteIDand returnsrouteIDbut the Android team helped me realize that our backend views therouteIDin the GTFS data (string in the GTFS) but returns it as arouteNumber(type Number). So I needed to make that change so that backend is consistent. I didn't choose to modify this in the microservice, because the whole point of the python code is to abstract that away from having to deal with what the clients know about our backend.Changes Made
Changed references of
routeIDtorouteNumberand changed data type of string to number.Updated docker compose to run locally.
Updated swagger docs to reflect new required field in request body and new field in response body.
Test Coverage
Works locally, will be pushing onto servers soon.
Related PRs or Issues
#293 updated
Screenshots