From ebd8e1dc017576530ef38f79bdbb8106455bc0a2 Mon Sep 17 00:00:00 2001 From: Takara Baumbach Date: Fri, 27 Oct 2023 09:18:59 +0200 Subject: [PATCH] fix: suppress empty legs property in routing JSON responses --- .../responses/routing/json/JSONIndividualRouteResponse.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ors-api/src/main/java/org/heigit/ors/api/responses/routing/json/JSONIndividualRouteResponse.java b/ors-api/src/main/java/org/heigit/ors/api/responses/routing/json/JSONIndividualRouteResponse.java index 0e11d7e0c2..445e95e0fc 100644 --- a/ors-api/src/main/java/org/heigit/ors/api/responses/routing/json/JSONIndividualRouteResponse.java +++ b/ors-api/src/main/java/org/heigit/ors/api/responses/routing/json/JSONIndividualRouteResponse.java @@ -62,8 +62,9 @@ public class JSONIndividualRouteResponse extends JSONBasedIndividualRouteRespons @Schema(description = "List containing the legs the route consists of.") @JsonProperty("legs") - @JsonInclude() + @JsonInclude(JsonInclude.Include.NON_EMPTY) private final List legs; + private final Map extras; @Schema(description = "Departure date and time",