Restructure walk/bicycle/car preferences in router-config.json - #5582
Conversation
3813de5 to
cbf2406
Compare
…ngle configuration
cbf2406 to
831a4d8
Compare
| /** | ||
| * Bicycle optimization types that are only meant to be used by the REST API. Related to {@link org.opentripplanner.routing.core.BicycleOptimizeType} | ||
| */ | ||
| public enum LegacyBicycleOptimizeType { |
There was a problem hiding this comment.
👍 Nice separation here.
| // triangle overrides the optimization type if defined | ||
| .withForcedOptimizeTriangle(it -> mapOptimizationTriangle(cb, it)) | ||
| .withWalking(it -> mapVehicleWalking(cb, it)) | ||
| .withParking(it -> mapParking(cb, it)) | ||
| .withRental(it -> mapRental(cb, it)); |
There was a problem hiding this comment.
A very nice cleanup. 👍
| ) | ||
| .withRental(it -> setVehicleRental(c, it)); | ||
| // triangle overrides the optimization type if defined | ||
| .withForcedOptimizeTriangle(it -> mapOptimizationTriangle(cb, it)) |
There was a problem hiding this comment.
I'm in favour of this behaviour but doesn't this change how the API works?
There was a problem hiding this comment.
This is only used by the configuration which we can break now. Later on I will use it for the new plan query as well. All the other places use the old method.
leonardehrenfried
left a comment
There was a problem hiding this comment.
I have a few comments but generally I think this is a great PR.
…ce/VehicleWalkingPreferences.java Co-authored-by: Leonard Ehrenfried <mail@leonard.io>
|
It's not directly related to this PR but I realised that we don't have a test for mapping the Do you think you can pull it into this branch? |
Thanks, I've included it now. |
Summary
Make own wrapper objects for bicycle, car and walk in router-config.json. Additionally, make parking and rental objects for car and triangle, walk, rental and parking objects for bicycle.
Issue
This is related to #4803
Unit tests
Added and updated tests
Documentation
Updated documentation
Changelog
From title