Fix regression error in passThroughPoints in the Transmodel API #6162
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
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.