Rest
JVM since0.0.1 Native since0.0.1
Expose REST services and their OpenAPI Specification or call external REST services.
What’s inside
-
REST component, URI syntax:
rest:method:path:uriTemplate
-
REST API component, URI syntax:
rest-api:path/contextIdPattern
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-rest</artifactId>
</dependency>
Check the User guide for more information about writing Camel Quarkus applications.
Additional Camel Quarkus configuration
This extension depends on the xref:extensions/platform-http.adoc extension and configures it as the component that provides the REST transport.
To use another REST transport provider, such as netty-http
or servlet
, you need to add the respective
extension as a dependency to your project and set the provider in your RouteBuilder
. E.g. for servlet
, you’d
have to add the org.apache.camel.quarkus:camel-quarkus-servlet
dependency and the set the provider as
follows:
import org.apache.camel.builder.RouteBuilder;
public class CamelRoute extends RouteBuilder {
@Override
public void configure() {
restConfiguration()
.component("servlet");
...
}
}