quarkus-rest integrates RESTful web-service support into Quarkus. It provides the default REST layer and implements the Jakarta RESTful Web Services (JAX-RS) specification, allowing applications to expose REST resources through an annotation-based model. section 2.1.1 section 4.1
Use quarkus-rest to:
- Add REST support as the io.quarkus:quarkus-rest Maven dependency. section 2.7.1
- Generate a Quarkus application with the quarkus-rest extension selected. section 2.1.1
- Define resources with JAX-RS annotations such as @Path, @GET, @POST, @Consumes, and @Produces. section 4.1
- Combine REST support with separate JSON serialization extensions when REST endpoints need JSON. section 2.7.1
Generate a REST-enabled application
Run the Quarkus Maven plugin with -Dextensions="quarkus-rest" to create a project. Pin -DplatformVersion=3.15.1 when reproducing the stated platform version; otherwise, the latest available platform version is used. section 2.1.1
Listing 2.18 Quarkus REST extension Maven dependency
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest</artifactId>
</dependency>
Inspect the Maven dependency that adds quarkus-rest to an existing Quarkus project. section 2.7.1
