Skip to content

Fix/schedule for route trip ref ids#758

Open
ashnaaseth2325-oss wants to merge 6 commits intoOneBusAway:mainfrom
ashnaaseth2325-oss:fix/schedule-for-route-trip-ref-ids
Open

Fix/schedule for route trip ref ids#758
ashnaaseth2325-oss wants to merge 6 commits intoOneBusAway:mainfrom
ashnaaseth2325-oss:fix/schedule-for-route-trip-ref-ids

Conversation

@ashnaaseth2325-oss
Copy link
Copy Markdown
Contributor

1. SUMMARY

Fixes missing agency prefixes on routeId and serviceId in the schedule-for-route response.Small change in schedule_for_route_handler.go to make output consistent with other endpoints.


2. FIX

// before
t.RouteID, t.ServiceID

// after
utils.FormCombinedID(agencyID, t.RouteID),
utils.FormCombinedID(agencyID, t.ServiceID)

3. VERIFICATION

  1. Call /schedule-for-route/1_routeX

  2. Check IDs:

    • Before → "routeX"
    • After → "1_routeX"
  3. Follow-up calls using these IDs now work (no 404)

Use comma-ok on presentRoutes to skip trips whose route ID
is not populated, preventing silent empty AgencyID in combined IDs.

Signed-off-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com>
Signed-off-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com>
… trip refs

Signed-off-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com>
…leWithNilID test

Signed-off-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com>
@ashnaaseth2325-oss
Copy link
Copy Markdown
Contributor Author

Hi @aaronbrethorst,
Please review this PR.
Thanks!

@ashnaaseth2325-oss
Copy link
Copy Markdown
Contributor Author

Hi @aaronbrethorst, just a quick ping on this PR .
Would appreciate a review when you get a chance. Thanks!

@ashnaaseth2325-oss
Copy link
Copy Markdown
Contributor Author

Hi @aaronbrethorst,
Kindly take a look!

@aaronbrethorst
Copy link
Copy Markdown
Member

please fix merge conflicts!

@ashnaaseth2325-oss
Copy link
Copy Markdown
Contributor Author

Thanks @aaronbrethorst !
I’ve resolved the merge conflicts.
Let me know if you’d like any further changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants