This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch rest-jmx in repository https://gitbox.apache.org/repos/asf/camel.git
commit 068c9c829a52d7a6923a763b53a0ddbe70fd7cf5 Author: Claus Ibsen <[email protected]> AuthorDate: Sat Nov 29 13:51:58 2025 +0100 rest-dsl using contract-first should include source location for pseudo-route --- .../src/main/java/org/apache/camel/model/rest/RestDefinition.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java index eb519dbca591..379d02acb6cc 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java @@ -1038,6 +1038,9 @@ public class RestDefinition extends OptionalIdentifiedDefinition<RestDefinition> boolean clientRequestValidation, boolean clientResponseValidation) { RouteDefinition route = new RouteDefinition(); + route.setResource(getResource()); + route.setLocation(getLocation()); + route.setLineNumber(getLineNumber()); if (openApi.getRouteId() != null) { route.routeId(parseText(camelContext, openApi.getRouteId())); } @@ -1103,6 +1106,8 @@ public class RestDefinition extends OptionalIdentifiedDefinition<RestDefinition> // the route should be from this rest endpoint route.fromRest(from); + route.getInput().setLocation(getLocation()); + route.getInput().setLineNumber(getLineNumber()); route.setRestDefinition(this); answer.add(route); }
