-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix regression error in passThroughPoints in the Transmodel API #6162
Fix regression error in passThroughPoints in the Transmodel API #6162
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6162 +/- ##
=============================================
- Coverage 69.93% 69.90% -0.03%
+ Complexity 17715 17710 -5
=============================================
Files 1996 1996
Lines 75365 75337 -28
Branches 7705 7717 +12
=============================================
- Hits 52705 52663 -42
- Misses 19989 19996 +7
- Partials 2671 2678 +7 ☔ View full report in Codecov by Sentry. |
...ion/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripViaLocationMapperTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good but I noticed a small typo.
The list of ids inside passThroughPoints is allowed to be empty or null. We cannot change this - that would be a breaking change. So, when the via search enforced this, the API was not backward compatible anymore. This commit reverts the behavior and just ignores the passThroughPoints if the list of ids is null or empty. This bug was introduced in PR opentripplanner#6084.
d761531
to
1b8da58
Compare
Summary
The list of ids inside passThroughPoints is allowed to be empty or null. We cannot change this - that would be a breaking change. So, when the via search enforced this, the API was not backward compatible anymore. This commit reverts the behavior and just ignores the passThroughPoints if the list of ids is null or empty. This bug was
introduced in PR #6084.
This PR also changes the graphql schema for via search - the assumtion is that no one has put it in production jet. The list of stop ids are med required. This was initially optional, because we want to add coordinates. But, it should be relaxed when the coordinates are added, not now. At least one id or coordinate must be set anyway!
Issue
🟥 There is not OTP issue for this.
Unit tests
✅ Regression unit tests are added to via and passthrough in the TransmodelAPI for this.
Documentation
🟥 This does not change any doc.
Changelog
🟥 This is a regression fix to the via PR #6084 merged last week.
Bumping the serialization version id
🟥 Should not be requiered.