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/08/21 12:51:43 UTC

[GitHub] [camel-quarkus] Nillkki opened a new issue #1563: Unable to set contextPath for platform-http with REST DSL

Nillkki opened a new issue #1563:
URL: https://github.com/apache/camel-quarkus/issues/1563


   **Describe the issue**
   contextPath not set when using platform-http component in REST DSL
   
   **To Reproduce**
   Add `camel-quarkus-rest`, `camel-quarkus-platform-http` and `camel-quarkus-openapi-java` extensions to project
   
   Create RouteBuilder with:
   
   ```Java
   restConfiguration().component("platform-http").bindingMode(RestBindingMode.off)
       // and output using pretty print
       .dataFormatProperty("prettyPrint", "true")
       // setup context path and port number that api will use
       .contextPath("api/v1")
       .port(8080)
       .host("0.0.0.0")
       // add OpenApi api-doc out of the box
       .apiContextPath("/api-doc")
           .apiProperty("api.title", "API Title") 
           .apiProperty("api.description", "API Description")
           .apiProperty("api.version", "1.0.0")
           // and enable CORS
   	.apiProperty("cors", "true")
   ;
   
   rest()
       .get("/alive")
       .id("api-alive")
       .produces("text/plain")
       .responseMessage()
       .code(200).message("Alive")
       .endResponseMessage()
       .route().transform().constant("alive")
       .end()
   ;		
   ```
   
   Observer that /alive -endpoint is at http://localhost:8080/alive and not at http://localhost:8080/api/v1/alive
   
   Is this expected behaviour? If so, is there another way to create API with contextPath?


----------------------------------------------------------------
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



[GitHub] [camel-quarkus] ppalaga commented on issue #1563: Unable to set contextPath for platform-http with REST DSL

Posted by GitBox <gi...@apache.org>.
ppalaga commented on issue #1563:
URL: https://github.com/apache/camel-quarkus/issues/1563#issuecomment-678376722


   Blocked by https://issues.apache.org/jira/browse/CAMEL-15447


----------------------------------------------------------------
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



[GitHub] [camel-quarkus] ppalaga commented on issue #1563: [Camel 3.5?] contextPath ignored for platform-http with REST DSL

Posted by GitBox <gi...@apache.org>.
ppalaga commented on issue #1563:
URL: https://github.com/apache/camel-quarkus/issues/1563#issuecomment-678413441


   Thanks for the report, it seems to be an oversight on my side. The fix [1] will hopefully reach Camel Quarkus via Camel 3.5.0
   
   [1] https://github.com/apache/camel/pull/4117


----------------------------------------------------------------
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



[GitHub] [camel-quarkus] ppalaga closed issue #1563: [Camel 3.5?] contextPath ignored for platform-http with REST DSL

Posted by GitBox <gi...@apache.org>.
ppalaga closed issue #1563:
URL: https://github.com/apache/camel-quarkus/issues/1563


   


----------------------------------------------------------------
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