Skip to content

fix: return waytype instead of waytypes for extra info #2015

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

Merged
merged 3 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Releasing is documented in RELEASE.md
- repair broken integration tests with by pining buildkit 0.15 ([#2003](https://github.com/GIScience/openrouteservice/pull/2003))
- elevation set to false not taken into account ([#1967](https://github.com/GIScience/openrouteservice/issues/1967))
- make gpx response adhere to standard and set version to 1.1 ([#2004](https://github.com/GIScience/openrouteservice/issues/2004))
- return correct extra info label for 'waytype' ([#1579](https://github.com/GIScience/openrouteservice/issues/1579))

### Security

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ void testInvalidExtraInfoWarning() {
.body("routes[0].extras.containsKey('suitability')", is(true))
.body("routes[0].extras.containsKey('surface')", is(true))
.body("routes[0].extras.containsKey('waycategory')", is(true))
.body("routes[0].extras.containsKey('waytypes')", is(true))
.body("routes[0].extras.containsKey('waytype')", is(true))
.body("routes[0].extras.containsKey('traildifficulty')", is(true))
.body("routes[0].extras.containsKey('green')", is(true))
.body("routes[0].extras.containsKey('noise')", is(true))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ public class ExtraInfoProcessor implements PathProcessor {
surfaceInfoBuilder = new AppendableRouteExtraInfoBuilder(surfaceInfo);
}
if (includeExtraInfo(extraInfo, RouteExtraInfoFlag.WAY_TYPE)) {
wayTypeInfo = new RouteExtraInfo("waytypes");
wayTypeInfo = new RouteExtraInfo("waytype");
wayTypeInfoBuilder = new AppendableRouteExtraInfoBuilder(wayTypeInfo);
}
} else {
skippedExtras.add("surface/waytypes");
skippedExtras.add("surface/waytype");
}
}

Expand Down
Loading