You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/04/01 16:45:14 UTC

[GitHub] [camel-quarkus] lburgazzoli opened a new pull request #1012: Workaround for the platform http not be able to handle matchOnUriPrefix

lburgazzoli opened a new pull request #1012: Workaround for the platform http not be able to handle matchOnUriPrefix
URL: https://github.com/apache/camel-quarkus/pull/1012
 
 
   [ ] An issue should be filed for the change unless this is a trivial change (fixing a typo or similar). One issue should ideally be fixed by not more than one commit and the other way round, each commit should fix just one issue, without pulling in other changes.
   [ ] Each commit in the pull request should have a meaningful and properly spelled subject line and body. Copying the title of the associated issue is typically enough. Please include the issue number in the commit message prefixed by #.
   [ ] The pull request description should explain what the pull request does, how, and why. If the info is available in the associated issue or some other external document, a link is enough.
   [ ] Phrases like Fix #<issueNumber> or Fixes #<issueNumber> will auto-close the named issue upon merging the pull request. Using them is typically a good idea.
   [ ] Please run mvn process-resources -Pformat (and amend the changes if necessary) before sending the pull request.
   [ ] Contributor guide is your good friend: https://camel.apache.org/camel-quarkus/latest/contributor-guide.html

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #1012: Workaround for the platform http not be able to handle matchOnUriPrefix

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on a change in pull request #1012: Workaround for the platform http not be able to handle matchOnUriPrefix
URL: https://github.com/apache/camel-quarkus/pull/1012#discussion_r401861080
 
 

 ##########
 File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/PlatformHttpRecorder.java
 ##########
 @@ -37,7 +39,20 @@
     }
 
     public RuntimeValue<PlatformHttpComponent> createComponent(RuntimeValue<PlatformHttpEngine> engine) {
-        PlatformHttpComponent component = new PlatformHttpComponent();
+        PlatformHttpComponent component = new PlatformHttpComponent() {
+            @Override
+            protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+                // remove matchOnUriPrefix as it will be fixed by camel 3.2 but will cause the context
+                // to fail as the property cannot be bound to the enpoint.
+                //
+                // TODO: remove once migrating to camel 3.2
+                parameters.remove("matchOnUriPrefix");
 
 Review comment:
   we could but actually the property is only added by platform-http component itself (when generating rest endpoints) even if it is not a property it  is able to handle so basically it would warn itself

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] lburgazzoli merged pull request #1012: Workaround for the platform http not be able to handle matchOnUriPrefix

Posted by GitBox <gi...@apache.org>.
lburgazzoli merged pull request #1012: Workaround for the platform http not be able to handle matchOnUriPrefix
URL: https://github.com/apache/camel-quarkus/pull/1012
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #1012: Workaround for the platform http not be able to handle matchOnUriPrefix

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on a change in pull request #1012: Workaround for the platform http not be able to handle matchOnUriPrefix
URL: https://github.com/apache/camel-quarkus/pull/1012#discussion_r401861080
 
 

 ##########
 File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/PlatformHttpRecorder.java
 ##########
 @@ -37,7 +39,20 @@
     }
 
     public RuntimeValue<PlatformHttpComponent> createComponent(RuntimeValue<PlatformHttpEngine> engine) {
-        PlatformHttpComponent component = new PlatformHttpComponent();
+        PlatformHttpComponent component = new PlatformHttpComponent() {
+            @Override
+            protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+                // remove matchOnUriPrefix as it will be fixed by camel 3.2 but will cause the context
+                // to fail as the property cannot be bound to the enpoint.
+                //
+                // TODO: remove once migrating to camel 3.2
+                parameters.remove("matchOnUriPrefix");
 
 Review comment:
   we could but actually the property is only added by platform-http component itself (when generating rest endpoints) even if it is not a property it  is able to handles so basically it would warn itself

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] lburgazzoli commented on issue #1012: Workaround for the platform http not be able to handle matchOnUriPrefix

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1012: Workaround for the platform http not be able to handle matchOnUriPrefix
URL: https://github.com/apache/camel-quarkus/pull/1012#issuecomment-607638264
 
 
   failure on java 11 tests seems not related to the PR

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #1012: Workaround for the platform http not be able to handle matchOnUriPrefix

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #1012: Workaround for the platform http not be able to handle matchOnUriPrefix
URL: https://github.com/apache/camel-quarkus/pull/1012#discussion_r401856825
 
 

 ##########
 File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/PlatformHttpRecorder.java
 ##########
 @@ -37,7 +39,20 @@
     }
 
     public RuntimeValue<PlatformHttpComponent> createComponent(RuntimeValue<PlatformHttpEngine> engine) {
-        PlatformHttpComponent component = new PlatformHttpComponent();
+        PlatformHttpComponent component = new PlatformHttpComponent() {
+            @Override
+            protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+                // remove matchOnUriPrefix as it will be fixed by camel 3.2 but will cause the context
+                // to fail as the property cannot be bound to the enpoint.
+                //
+                // TODO: remove once migrating to camel 3.2
+                parameters.remove("matchOnUriPrefix");
 
 Review comment:
   Shouldn't we warn at least that matchOnUriPrefix is ignored?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services