Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15447

contextPath ignored for platform-http with REST DSL

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.0
    • Component/s: None
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Original report https://github.com/apache/camel-quarkus/issues/1563

      Reproducible with

      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()
      ;		
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ppalaga Peter Palaga
                Reporter:
                ppalaga Peter Palaga
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: