You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/12/10 11:05:09 UTC
[camel] branch main updated: CAMEL-17295: rest-dsl - Fix parse uri template for query parameters.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new e9554e7 CAMEL-17295: rest-dsl - Fix parse uri template for query parameters.
e9554e7 is described below
commit e9554e77365d6f6f3328e199f2fa5983bf17df3b
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Dec 10 12:03:13 2021 +0100
CAMEL-17295: rest-dsl - Fix parse uri template for query parameters.
---
.../src/main/java/org/apache/camel/model/RouteDefinitionHelper.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinitionHelper.java b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinitionHelper.java
index fd73a1f..3cf3d45 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinitionHelper.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinitionHelper.java
@@ -228,11 +228,11 @@ public final class RouteDefinitionHelper {
/**
* Find verb associated with the route by mapping uri
*/
- private static VerbDefinition findVerbDefinition(RestDefinition rest, String endpointUri) {
+ private static VerbDefinition findVerbDefinition(RestDefinition rest, String endpointUri) throws Exception {
VerbDefinition ret = null;
String preVerbUri = "";
for (VerbDefinition verb : rest.getVerbs()) {
- String verbUri = rest.buildFromUri(verb);
+ String verbUri = URISupport.normalizeUri(rest.buildFromUri(verb));
if (endpointUri.startsWith(verbUri) && preVerbUri.length() < verbUri.length()) {
// if there are multiple verb uri match, select the most
// specific one