apache / camel-quarkus

Apache Camel Quarkus
https://camel.apache.org
Apache License 2.0
256 stars 189 forks source link

Camel rest returns 404 status code instead of 405 #4269

Open krystianmuchla opened 1 year ago

krystianmuchla commented 1 year ago

When I define an endpoint with Camel:

rest().get("/hello").to("direct:hello");
from("direct:hello").setBody(constant("Hello World"));

request with GET method to /hello returns 200 status code and request with POST method to /hello returns 405 status code. This is expected behaviour.

Once I add an endpoint with Quarkus:

@Path("/bye")
public class QuarkusEndpoint {
  @GET
  public String bye() {
    return "Bye World";
  }
}

request with POST method to /hello doesn't return 405 status code anymore but 404.

jamesnetherton commented 1 year ago

Might be similar to this https://github.com/apache/camel-quarkus/issues/2042.