Expose stop transfer priority in Transmodel API - #5942
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #5942 +/- ##
=============================================
- Coverage 69.46% 69.45% -0.01%
+ Complexity 17076 17069 -7
=============================================
Files 1937 1937
Lines 73680 73712 +32
Branches 7539 7540 +1
=============================================
+ Hits 51182 51200 +18
- Misses 19874 19884 +10
- Partials 2624 2628 +4 ☔ View full report in Codecov by Sentry. |
14cc0a3 to
2a4a8da
Compare
2a4a8da to
10f7464
Compare
| .value( | ||
| "preferred", | ||
| StopTransferPriority.PREFERRED, | ||
| "Preferred place to transfer, strongly recommended. NeTEx equivalent is PREFERRED_INTERCHANGE." |
There was a problem hiding this comment.
Woudl it be possible to use @DocumentedEnum here?
There was a problem hiding this comment.
I'm not sure what you are referring to?
There was a problem hiding this comment.
Rather than using Javadoc which is then copied to the GraphQL schema, you can annotate the enum and have only a single place for the documentation, like this:
It's particularly useful if you have the information in both the HTML documentation as well as the schema, so it's usefulness isn't quite so high here.
|
We can discuss this in the next dev meeting |
Summary
This PR exposes stop transfer priority in the TransModel API.
"Stop transfer priority" is used to specify the relative preference of a stop when several stops can be used for a transfer.
In the TransModel API
transfersare referred to asinterchanges.The naming of the existing field
weightingwas confusing and the data fetching was never implemented (it returned always the same value)It is replaced by
stopInterchangePrioritywhose name matches more clearly the nameinterchangePriority, that is the priority set on interchanges.The NeTEx enum values are also confusing, in particular
interchangeNotAllowed. It is replaced bydiscouragedwhich matches the actual behaviour of OTP (not banning but discouraging the transfer at a given stop).Issue
No
Unit tests
No
Documentation
Updated API documentation