From a990a5441d4800bb30750c1b724a37c24247d9d9 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Tue, 5 Mar 2024 17:21:06 +0100 Subject: [PATCH] Update the documentation for REST renaming --- .../resteasy-reactive-codestart/codestart.yml | 2 +- docs/src/main/asciidoc/amqp.adoc | 4 +- docs/src/main/asciidoc/ansible.adoc | 2 +- docs/src/main/asciidoc/aws-lambda-http.adoc | 8 +- .../main/asciidoc/azure-functions-http.adoc | 6 +- .../main/asciidoc/building-native-image.adoc | 2 +- docs/src/main/asciidoc/cache.adoc | 4 +- docs/src/main/asciidoc/cassandra.adoc | 8 +- .../asciidoc/centralized-log-management.adoc | 2 +- docs/src/main/asciidoc/cli-tooling.adoc | 2 +- .../main/asciidoc/command-mode-reference.adoc | 4 +- docs/src/main/asciidoc/config.adoc | 2 +- .../main/asciidoc/context-propagation.adoc | 14 +-- .../asciidoc/deploying-to-google-cloud.adoc | 2 +- .../asciidoc/deploying-to-kubernetes.adoc | 6 +- .../main/asciidoc/deploying-to-openshift.adoc | 2 +- .../src/main/asciidoc/duplicated-context.adoc | 8 +- docs/src/main/asciidoc/elasticsearch.adoc | 6 +- .../main/asciidoc/extension-codestart.adoc | 4 +- .../src/main/asciidoc/extension-metadata.adoc | 24 ++-- .../src/main/asciidoc/gcp-functions-http.adoc | 10 +- .../getting-started-dev-services.adoc | 6 +- .../asciidoc/getting-started-reactive.adoc | 6 +- docs/src/main/asciidoc/getting-started.adoc | 20 ++-- docs/src/main/asciidoc/gradle-tooling.adoc | 4 +- .../main/asciidoc/grpc-getting-started.adoc | 6 +- docs/src/main/asciidoc/grpc-kubernetes.adoc | 2 +- .../main/asciidoc/hibernate-orm-panache.adoc | 6 +- .../asciidoc/hibernate-reactive-panache.adoc | 6 +- .../src/main/asciidoc/hibernate-reactive.adoc | 4 +- .../hibernate-search-orm-elasticsearch.adoc | 4 +- docs/src/main/asciidoc/infinispan-client.adoc | 2 +- docs/src/main/asciidoc/jms.adoc | 4 +- .../kafka-reactive-getting-started.adoc | 4 +- .../asciidoc/kafka-schema-registry-avro.adoc | 10 +- .../kafka-schema-registry-json-schema.adoc | 10 +- docs/src/main/asciidoc/kafka-streams.adoc | 4 +- docs/src/main/asciidoc/kafka.adoc | 6 +- docs/src/main/asciidoc/kotlin.adoc | 20 ++-- docs/src/main/asciidoc/lra.adoc | 2 +- docs/src/main/asciidoc/mailer.adoc | 6 +- docs/src/main/asciidoc/maven-tooling.adoc | 14 +-- .../asciidoc/messaging-virtual-threads.adoc | 2 +- docs/src/main/asciidoc/mongodb-panache.adoc | 14 +-- docs/src/main/asciidoc/mongodb.adoc | 4 +- docs/src/main/asciidoc/mutiny-primer.adoc | 4 +- docs/src/main/asciidoc/native-and-ssl.adoc | 2 +- docs/src/main/asciidoc/native-reference.adoc | 4 +- docs/src/main/asciidoc/openapi-swaggerui.adoc | 2 +- docs/src/main/asciidoc/opentelemetry.adoc | 8 +- .../main/asciidoc/performance-measure.adoc | 2 +- .../main/asciidoc/pulsar-getting-started.adoc | 4 +- docs/src/main/asciidoc/pulsar.adoc | 2 +- .../quarkus-reactive-architecture.adoc | 6 +- docs/src/main/asciidoc/quartz.adoc | 2 +- docs/src/main/asciidoc/qute-reference.adoc | 8 +- docs/src/main/asciidoc/qute.adoc | 10 +- docs/src/main/asciidoc/rabbitmq.adoc | 4 +- .../src/main/asciidoc/reactive-event-bus.adoc | 4 +- docs/src/main/asciidoc/reactive-routes.adoc | 4 +- .../main/asciidoc/reactive-sql-clients.adoc | 12 +- docs/src/main/asciidoc/redis.adoc | 2 +- ...-client-reactive.adoc => rest-client.adoc} | 103 +++++++++--------- docs/src/main/asciidoc/rest-data-panache.adoc | 30 ++--- docs/src/main/asciidoc/rest-json.adoc | 32 +++--- ...ive-migration.adoc => rest-migration.adoc} | 90 +++++++-------- ...threads.adoc => rest-virtual-threads.adoc} | 24 ++-- .../{resteasy-reactive.adoc => rest.adoc} | 86 +++++++-------- .../asciidoc/resteasy-client-multipart.adoc | 6 +- docs/src/main/asciidoc/resteasy-client.adoc | 8 +- docs/src/main/asciidoc/resteasy.adoc | 8 +- docs/src/main/asciidoc/scheduler.adoc | 4 +- docs/src/main/asciidoc/scripting.adoc | 22 ++-- .../security-authentication-mechanisms.adoc | 4 +- ...ity-authorize-web-endpoints-reference.adoc | 2 +- .../asciidoc/security-csrf-prevention.adoc | 4 +- .../security-getting-started-tutorial.adoc | 2 +- docs/src/main/asciidoc/security-jdbc.adoc | 2 +- docs/src/main/asciidoc/security-jwt.adoc | 8 +- .../security-keycloak-admin-client.adoc | 18 +-- .../security-keycloak-authorization.adoc | 2 +- docs/src/main/asciidoc/security-ldap.adoc | 2 +- docs/src/main/asciidoc/security-oauth2.adoc | 6 +- .../security-oidc-auth0-tutorial.adoc | 10 +- ...-bearer-token-authentication-tutorial.adoc | 4 +- ...idc-code-flow-authentication-tutorial.adoc | 2 +- ...urity-openid-connect-client-reference.adoc | 50 ++++----- .../security-openid-connect-client.adoc | 16 +-- .../security-openid-connect-multitenancy.adoc | 2 +- docs/src/main/asciidoc/security-overview.adoc | 6 +- .../security-proactive-authentication.adoc | 2 +- docs/src/main/asciidoc/security-webauthn.adoc | 2 +- .../asciidoc/smallrye-fault-tolerance.adoc | 4 +- .../asciidoc/smallrye-graphql-client.adoc | 4 +- docs/src/main/asciidoc/smallrye-metrics.adoc | 2 +- .../main/asciidoc/spring-boot-properties.adoc | 2 +- docs/src/main/asciidoc/spring-cache.adoc | 2 +- .../asciidoc/spring-cloud-config-client.adoc | 2 +- docs/src/main/asciidoc/spring-data-jpa.adoc | 2 +- docs/src/main/asciidoc/spring-data-rest.adoc | 2 +- docs/src/main/asciidoc/spring-di.adoc | 2 +- docs/src/main/asciidoc/spring-scheduled.adoc | 2 +- docs/src/main/asciidoc/spring-security.adoc | 8 +- docs/src/main/asciidoc/spring-web.adoc | 10 +- docs/src/main/asciidoc/stork-kubernetes.adoc | 6 +- docs/src/main/asciidoc/stork-reference.adoc | 2 +- docs/src/main/asciidoc/stork.adoc | 6 +- .../telemetry-micrometer-tutorial.adoc | 2 +- .../main/asciidoc/telemetry-micrometer.adoc | 4 +- ...elemetry-opentracing-to-otel-tutorial.adoc | 12 +- .../main/asciidoc/tests-with-coverage.adoc | 2 +- docs/src/main/asciidoc/validation.adoc | 6 +- docs/src/main/asciidoc/vertx-reference.adoc | 6 +- docs/src/main/asciidoc/vertx.adoc | 8 +- docs/src/main/asciidoc/virtual-threads.adoc | 18 +-- .../src/main/asciidoc/writing-extensions.adoc | 4 +- .../resteasy-reactive-codestart/codestart.yml | 2 +- ...c_main_java_org_acme_GreetingResource.java | 2 +- ...st_java_org_acme_GreetingResourceTest.java | 2 +- ...c_main_java_org_acme_GreetingResource.java | 2 +- ...st_java_org_acme_GreetingResourceTest.java | 2 +- ..._java_ilove_quark_us_GreetingResource.java | 2 +- ..._kotlin_ilove_quark_us_GreetingResource.kt | 2 +- ...cala_ilove_quark_us_GreetingResource.scala | 2 +- ...a_ilove_quark_us_GreetingResourceTest.java | 2 +- ...lin_ilove_quark_us_GreetingResourceTest.kt | 2 +- ..._ilove_quark_us_GreetingResourceTest.scala | 2 +- ..._java_ilove_quark_us_GreetingResource.java | 2 +- ..._kotlin_ilove_quark_us_GreetingResource.kt | 2 +- .../main/java/org/acme/GreetingResource.java | 2 +- .../java/org/acme/GreetingResourceTest.java | 2 +- .../java/io/quarkus/maven/it/DevMojoIT.java | 2 +- .../java/org/acme/GreetingResourceTest.java | 2 +- .../main/java/org/acme/GreetingResource.java | 2 +- .../main/java/org/acme/GreetingResource.java | 2 +- .../it/opentelemetry/GreetingResource.java | 2 +- .../OpenTelemetryDisabledTest.java | 2 +- .../it/opentelemetry/OpenTelemetryTest.java | 2 +- 138 files changed, 542 insertions(+), 545 deletions(-) rename docs/src/main/asciidoc/{rest-client-reactive.adoc => rest-client.adoc} (92%) rename docs/src/main/asciidoc/{resteasy-reactive-migration.adoc => rest-migration.adoc} (60%) rename docs/src/main/asciidoc/{resteasy-reactive-virtual-threads.adoc => rest-virtual-threads.adoc} (89%) rename docs/src/main/asciidoc/{resteasy-reactive.adoc => rest.adoc} (95%) diff --git a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-reactive-codestart/codestart.yml b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-reactive-codestart/codestart.yml index 63a3ad2f01369..84e384b4a39ef 100644 --- a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-reactive-codestart/codestart.yml +++ b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-reactive-codestart/codestart.yml @@ -12,7 +12,7 @@ language: resource: class-name: GreetingResource path: "/hello" - response: "Hello from RESTEasy Reactive" + response: "Hello from Quarkus REST" dependencies: - io.quarkus:quarkus-resteasy-reactive test-dependencies: diff --git a/docs/src/main/asciidoc/amqp.adoc b/docs/src/main/asciidoc/amqp.adoc index 17cc76e3268a3..29aac0172ef54 100644 --- a/docs/src/main/asciidoc/amqp.adoc +++ b/docs/src/main/asciidoc/amqp.adoc @@ -58,13 +58,13 @@ First, we need to create two projects: the _producer_ and the _processor_. To create the _producer_ project, in a terminal run: :create-app-artifact-id: amqp-quickstart-producer -:create-app-extensions: resteasy-reactive-jackson,smallrye-reactive-messaging-amqp +:create-app-extensions: rest-jackson,smallrye-reactive-messaging-amqp :create-app-post-command: include::{includes}/devtools/create-app.adoc[] This command creates the project structure and select the two Quarkus extensions we will be using: -1. RESTEasy Reactive and its Jackson support to handle JSON payloads +1. Quarkus REST (formerly RESTEasy Reactive) and its Jackson support to handle JSON payloads 2. The Reactive Messaging AMQP connector To create the _processor_ project, from the same directory, run: diff --git a/docs/src/main/asciidoc/ansible.adoc b/docs/src/main/asciidoc/ansible.adoc index 05b5db94e7d8a..970146f70b2a2 100644 --- a/docs/src/main/asciidoc/ansible.adoc +++ b/docs/src/main/asciidoc/ansible.adoc @@ -196,7 +196,7 @@ Apr 13 12:48:19 bd71f39642c8 java[853]: -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ Apr 13 12:48:19 bd71f39642c8 java[853]: --\___\_\____/_/ |_/_/|_/_/|_|\____/___/ Apr 13 12:48:19 bd71f39642c8 java[853]: 2023-04-13 12:48:19,284 INFO [io.quarkus] (main) getting-started 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.16.6.Final) started in 0.607s. Listening on: http://0.0.0.0:8080 Apr 13 12:48:19 bd71f39642c8 java[853]: 2023-04-13 12:48:19,309 INFO [io.quarkus] (main) Profile prod activated. -Apr 13 12:48:19 bd71f39642c8 java[853]: 2023-04-13 12:48:19,310 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, smallrye-context-propagation, vertx] +Apr 13 12:48:19 bd71f39642c8 java[853]: 2023-04-13 12:48:19,310 INFO [io.quarkus] (main) Installed features: [cdi, rest, smallrye-context-propagation, vertx] ---- Manually, you can also test if the app is reachable: diff --git a/docs/src/main/asciidoc/aws-lambda-http.adoc b/docs/src/main/asciidoc/aws-lambda-http.adoc index 49b7790237c26..517a31bf99545 100644 --- a/docs/src/main/asciidoc/aws-lambda-http.adoc +++ b/docs/src/main/asciidoc/aws-lambda-http.adoc @@ -3,7 +3,7 @@ This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// -= AWS Lambda with RESTEasy Reactive, Undertow, or Reactive Routes += AWS Lambda with Quarkus REST, Undertow, or Reactive Routes :extension-status: preview include::_attributes.adoc[] :categories: cloud @@ -13,7 +13,7 @@ include::_attributes.adoc[] :extensions: io.quarkus:quarkus-amazon-lambda,io.quarkus:quarkus-amazon-lambda-http With Quarkus you can deploy your favorite Java HTTP frameworks as AWS Lambda's using either the https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api.html[AWS Gateway HTTP API] -or https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-rest-api.html[AWS Gateway REST API]. This means that you can deploy your microservices written with RESTEasy Reactive (our Jakarta REST implementation), +or https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-rest-api.html[AWS Gateway REST API]. This means that you can deploy your microservices written with Quarkus REST (our Jakarta REST implementation), Undertow (servlet), Reactive Routes, xref:funqy-http.adoc[Funqy HTTP] or any other Quarkus HTTP framework as an AWS Lambda. IMPORTANT: You should only use single HTTP framework together with AWS Lambda extension to avoid unexpected conflicts and errors. @@ -249,7 +249,7 @@ There is nothing special about the POM other than the inclusion of the `quarkus- (if you are deploying an AWS Gateway HTTP API) or the `quarkus-amazon-lambda-rest` extension (if you are deploying an AWS Gateway REST API). These extensions automatically generate everything you might need for your lambda deployment. -Also, at least in the generated Maven archetype `pom.xml`, the `quarkus-resteasy-reactive`, `quarkus-reactive-routes`, and `quarkus-undertow` +Also, at least in the generated Maven archetype `pom.xml`, the `quarkus-rest`, `quarkus-reactive-routes`, and `quarkus-undertow` dependencies are all optional. Pick which HTTP framework(s) you want to use (Jakarta REST, Reactive Routes, and/or Servlet) and remove the other dependencies to shrink your deployment. @@ -298,7 +298,7 @@ HTTP response messages and the `sam.yaml` file must configure the API Gateway to == Injectable AWS Context Variables -If you are using RESTEasy Reactive and Jakarta REST, you can inject various AWS Context variables into your Jakarta REST resource classes +If you are using Quarkus REST and Jakarta REST, you can inject various AWS Context variables into your Jakarta REST resource classes using the Jakarta REST `@Context` annotation or anywhere else with the CDI `@Inject` annotation. For the AWS HTTP API you can inject the AWS variables `com.amazonaws.services.lambda.runtime.Context` and diff --git a/docs/src/main/asciidoc/azure-functions-http.adoc b/docs/src/main/asciidoc/azure-functions-http.adoc index 1affe1b2bbdd6..c55380b3489e0 100644 --- a/docs/src/main/asciidoc/azure-functions-http.adoc +++ b/docs/src/main/asciidoc/azure-functions-http.adoc @@ -3,7 +3,7 @@ This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// -= Azure Functions with RESTEasy Reactive, Undertow, or Reactive Routes += Azure Functions with Quarkus REST, Undertow, or Reactive Routes :extension-status: preview include::_attributes.adoc[] :categories: cloud @@ -11,7 +11,7 @@ include::_attributes.adoc[] :topics: azure,serverless,function,cloud :extensions: io.quarkus:quarkus-azure-functions-http -The `quarkus-azure-functions-http` extension allows you to write microservices with RESTEasy Reactive (our Jakarta REST implementation), +The `quarkus-azure-functions-http` extension allows you to write microservices with Quarkus REST (our Jakarta REST implementation), Undertow (servlet), Reactive Routes, or xref:funqy-http.adoc[Funqy HTTP] and make these microservices deployable to the Azure Functions runtime. In other words, this extension is a bridge from the Azure Functions HttpTrigger and the Quarkus family of HTTP APIs. @@ -30,7 +30,7 @@ include::{includes}/prerequisites.adoc[] == Solution -This guide walks you through running a maven project that can deploy a Resteasy Reactive endpoint to Azure Functions. +This guide walks you through running a maven project that can deploy a Quarkus REST endpoint to Azure Functions. While only Jakarta REST is provided as an example, you can easily replace it with the HTTP framework of your choice. == Creating the Maven/Gradle Project diff --git a/docs/src/main/asciidoc/building-native-image.adoc b/docs/src/main/asciidoc/building-native-image.adoc index f2f79557e668f..06019bc3fa111 100644 --- a/docs/src/main/asciidoc/building-native-image.adoc +++ b/docs/src/main/asciidoc/building-native-image.adoc @@ -266,7 +266,7 @@ __ ____ __ _____ ___ __ ____ ______ --\___\_\____/_/ |_/_/|_/_/|_|\____/___/ 2023-05-05 10:55:52,068 INFO [io.quarkus] (main) getting-started 1.0.0-SNAPSHOT native (powered by Quarkus 3.0.2.Final) started in 0.009s. Listening on: http://0.0.0.0:8081 2023-05-05 10:55:52,069 INFO [io.quarkus] (main) Profile prod activated. -2023-05-05 10:55:52,069 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, smallrye-context-propagation, vertx] +2023-05-05 10:55:52,069 INFO [io.quarkus] (main) Installed features: [cdi, rest, smallrye-context-propagation, vertx] [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.99 s - in org.acme.getting.started.GreetingResourceIT ... ---- diff --git a/docs/src/main/asciidoc/cache.adoc b/docs/src/main/asciidoc/cache.adoc index af3ebc278725a..c927e03a3cd9b 100644 --- a/docs/src/main/asciidoc/cache.adoc +++ b/docs/src/main/asciidoc/cache.adoc @@ -45,10 +45,10 @@ The solution is located in the `cache-quickstart` link:{quickstarts-tree-url}/ca First, we need to create a new Quarkus project with the following command: :create-app-artifact-id: cache-quickstart -:create-app-extensions: cache,resteasy-reactive-jackson +:create-app-extensions: cache,rest-jackson include::{includes}/devtools/create-app.adoc[] -This command generates the project and imports the `cache` and `resteasy-reactive-jackson` extensions. +This command generates the project and imports the `cache` and `rest-jackson` extensions. If you already have your Quarkus project configured, you can add the `cache` extension to your project by running the following command in your project base directory: diff --git a/docs/src/main/asciidoc/cassandra.adoc b/docs/src/main/asciidoc/cassandra.adoc index 473d30881f4b7..4168a3d906050 100644 --- a/docs/src/main/asciidoc/cassandra.adoc +++ b/docs/src/main/asciidoc/cassandra.adoc @@ -315,7 +315,7 @@ public class FruitDto { } ---- -The translation to and from JSON is done automatically by the Quarkus RESTEasy Reactive extension, which is +The translation to and from JSON is done automatically by the Quarkus REST (formerly RESTEasy Reactive) extension, which is included in this guide's pom.xml file. If you want to add it manually to your application, add the below snippet to your application's ppm.xml file: @@ -323,11 +323,11 @@ below snippet to your application's ppm.xml file: ---- io.quarkus - quarkus-resteasy-reactive + quarkus-rest io.quarkus - quarkus-resteasy-reactive-jackson + quarkus-rest-jackson ---- @@ -600,7 +600,7 @@ NOTE: The `getAll()` method above returns `Multi`, and the `add()` method return are the same Mutiny types that we met before; they are automatically recognized by the Quarkus reactive REST API, so we don't need to convert them into JSON ourselves. -RESTEasy Reactive natively supports the Mutiny reactive types e.g. `Uni` and `Multi`. +Quarkus REST natively supports the Mutiny reactive types e.g. `Uni` and `Multi`. This dependency is already included in this guide's pom.xml, but if you are starting a new project from scratch, make sure to include it. diff --git a/docs/src/main/asciidoc/centralized-log-management.adoc b/docs/src/main/asciidoc/centralized-log-management.adoc index d0239326718ce..663df993637c1 100644 --- a/docs/src/main/asciidoc/centralized-log-management.adoc +++ b/docs/src/main/asciidoc/centralized-log-management.adoc @@ -31,7 +31,7 @@ The following examples will all be based on the same example application that yo Create an application with the `quarkus-logging-gelf` extension. You can use the following command to create it: :create-app-artifact-id: gelf-logging -:create-app-extensions: resteasy-reactive,logging-gelf +:create-app-extensions: rest,logging-gelf include::{includes}/devtools/create-app.adoc[] If you already have your Quarkus project configured, you can add the `logging-gelf` extension diff --git a/docs/src/main/asciidoc/cli-tooling.adoc b/docs/src/main/asciidoc/cli-tooling.adoc index 409b69ce129e7..22b52d716cbbf 100644 --- a/docs/src/main/asciidoc/cli-tooling.adoc +++ b/docs/src/main/asciidoc/cli-tooling.adoc @@ -541,7 +541,7 @@ __ ____ __ _____ ___ __ ____ ______ --\___\_\____/_/ |_/_/|_/_/|_|\____/___/ 2021-05-27 10:15:56,032 INFO [io.quarkus] (Quarkus Main Thread) code-with-quarkus 1.0.0-SNAPSHOT on JVM (powered by Quarkus 999-SNAPSHOT) started in 1.387s. Listening on: http://localhost:8080 2021-05-27 10:15:56,035 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. -2021-05-27 10:15:56,035 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, resteasy-reactive, smallrye-context-propagation] +2021-05-27 10:15:56,035 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, rest, smallrye-context-propagation] -- Tests paused, press [r] to resume diff --git a/docs/src/main/asciidoc/command-mode-reference.adoc b/docs/src/main/asciidoc/command-mode-reference.adoc index c4aeb11dbdaa9..0f400f9121a6c 100644 --- a/docs/src/main/asciidoc/command-mode-reference.adoc +++ b/docs/src/main/asciidoc/command-mode-reference.adoc @@ -28,9 +28,9 @@ First, we need to create a new Quarkus project with the following command: include::{includes}/devtools/create-app.adoc[] NOTE: The suggested project creation command lines disable the codestarts to avoid including a REST server. Similarly, if you use code.quarkus.io to generate a -project, you need to go to *MORE OPTIONS -> Starter Code* and select *No* to avoid adding the RESTEasy Reactive extension. +project, you need to go to *MORE OPTIONS -> Starter Code* and select *No* to avoid adding the Quarkus REST (formerly RESTEasy Reactive) extension. -The RESTEasy Reactive extension is added automatically only if you ask for codestarts and you didn't specify any extensions. +The Quarkus REST extension is added automatically only if you ask for codestarts and you didn't specify any extensions. == Writing Command Mode Applications diff --git a/docs/src/main/asciidoc/config.adoc b/docs/src/main/asciidoc/config.adoc index 89f0d72eabc23..cffaa13ff8278 100644 --- a/docs/src/main/asciidoc/config.adoc +++ b/docs/src/main/asciidoc/config.adoc @@ -34,7 +34,7 @@ The solution is located in the `config-quickstart` link:{quickstarts-tree-url}/c First, we need a new project. Create a new project with the following command: :create-app-artifact-id: config-quickstart -:create-app-extensions: resteasy-reactive +:create-app-extensions: rest include::{includes}/devtools/create-app.adoc[] It generates: diff --git a/docs/src/main/asciidoc/context-propagation.adoc b/docs/src/main/asciidoc/context-propagation.adoc index 844d1ce586af2..fdfef1d23bae8 100644 --- a/docs/src/main/asciidoc/context-propagation.adoc +++ b/docs/src/main/asciidoc/context-propagation.adoc @@ -12,7 +12,7 @@ include::_attributes.adoc[] Traditional blocking code uses link:https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/ThreadLocal.html[`ThreadLocal`] variables to store contextual objects in order to avoid passing them as parameters everywhere. Many Quarkus extensions require those contextual objects to operate -properly: xref:rest-json.adoc[RESTEasy Reactive], xref:cdi-reference.adoc[ArC] and xref:transaction.adoc[Transaction] +properly: xref:rest-json.adoc[Quarkus REST (formerly RESTEasy Reactive)], xref:cdi-reference.adoc[ArC] and xref:transaction.adoc[Transaction] for example. If you write reactive/async code, you have to cut your work into a pipeline of code blocks that get executed @@ -44,10 +44,10 @@ In other words, add the following dependencies to your build file: [source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"] .pom.xml ---- - + io.quarkus - quarkus-resteasy-reactive + quarkus-rest @@ -59,13 +59,13 @@ In other words, add the following dependencies to your build file: [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -// RESTEasy Reactive extension if not already included -implementation("io.quarkus:quarkus-resteasy-reactive") +// Quarkus REST extension if not already included +implementation("io.quarkus:quarkus-rest") // Context Propagation extension implementation("io.quarkus:quarkus-smallrye-context-propagation") ---- -With this, you will get context propagation for ArC, RESTEasy Reactive and transactions, if you are using them. +With this, you will get context propagation for ArC, Quarkus REST and transactions, if you are using them. == Usage example with Mutiny @@ -218,7 +218,7 @@ their extensions: |`Jakarta REST` |N/A -|The RESTEasy Reactive or RESTEasy Classic context +|The Quarkus REST or RESTEasy Classic context |`Application` |https://javadoc.io/static/org.eclipse.microprofile.context-propagation/microprofile-context-propagation-api/1.2/org/eclipse/microprofile/context/ThreadContext.html#APPLICATION[`ThreadContext.APPLICATION`] diff --git a/docs/src/main/asciidoc/deploying-to-google-cloud.adoc b/docs/src/main/asciidoc/deploying-to-google-cloud.adoc index bacfa9fb5a1ba..ba07f67a0a2ef 100644 --- a/docs/src/main/asciidoc/deploying-to-google-cloud.adoc +++ b/docs/src/main/asciidoc/deploying-to-google-cloud.adoc @@ -45,7 +45,7 @@ gcloud auth login Quarkus supports deploying your application to Google Cloud Functions via the following extensions: - xref:gcp-functions.adoc[Google Cloud Functions]: Build functions using the Google Cloud Functions API. -- xref:gcp-functions-http.adoc[Google Cloud Functions HTTP binding]: Build functions using Quarkus HTTP APIs: RESTEasy Reactive (Jakarta REST), +- xref:gcp-functions-http.adoc[Google Cloud Functions HTTP binding]: Build functions using Quarkus HTTP APIs: Quarkus REST (formerly RESTEasy Reactive, our Jakarta REST implementation), Undertow (Servlet), Vert.x Web, or xref:funqy-http.adoc[Funqy HTTP]. - xref:funqy-gcp-functions.adoc[Funky Google Cloud Functions]: Build functions using Funqy. diff --git a/docs/src/main/asciidoc/deploying-to-kubernetes.adoc b/docs/src/main/asciidoc/deploying-to-kubernetes.adoc index 3cd9e2897cadc..be05f697039ed 100644 --- a/docs/src/main/asciidoc/deploying-to-kubernetes.adoc +++ b/docs/src/main/asciidoc/deploying-to-kubernetes.adoc @@ -28,7 +28,7 @@ include::{includes}/prerequisites.adoc[] Let's create a new project that contains both the Kubernetes and Jib extensions: :create-app-artifact-id: kubernetes-quickstart -:create-app-extensions: resteasy-reactive,kubernetes,jib +:create-app-extensions: rest,kubernetes,jib :create-app-code: include::{includes}/devtools/create-app.adoc[] @@ -39,7 +39,7 @@ This added the following dependencies to the build file: ---- io.quarkus - quarkus-resteasy-reactive + quarkus-rest io.quarkus @@ -54,7 +54,7 @@ This added the following dependencies to the build file: [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-resteasy-reactive") +implementation("io.quarkus:quarkus-rest") implementation("io.quarkus:quarkus-kubernetes") implementation("io.quarkus:quarkus-container-image-jib") ---- diff --git a/docs/src/main/asciidoc/deploying-to-openshift.adoc b/docs/src/main/asciidoc/deploying-to-openshift.adoc index b1a50d3aba7b6..09eb23d61ae75 100644 --- a/docs/src/main/asciidoc/deploying-to-openshift.adoc +++ b/docs/src/main/asciidoc/deploying-to-openshift.adoc @@ -26,7 +26,7 @@ include::{includes}/prerequisites.adoc[] First, we need a new project that contains the OpenShift extension. This can be done using the following command: :create-app-artifact-id: openshift-quickstart -:create-app-extensions: resteasy-reactive,openshift +:create-app-extensions: rest,openshift :create-app-code: include::{includes}/devtools/create-app.adoc[] diff --git a/docs/src/main/asciidoc/duplicated-context.adoc b/docs/src/main/asciidoc/duplicated-context.adoc index ae09214957784..a359809bc48aa 100644 --- a/docs/src/main/asciidoc/duplicated-context.adoc +++ b/docs/src/main/asciidoc/duplicated-context.adoc @@ -32,7 +32,7 @@ NOTE: This section is not an explanation of the reactive model. Refer to that xr Under the hood, Quarkus uses a reactive engine. This engine provides the efficiency and concurrency to cope with modern, containerized, and cloud-native applications. -For example, when you use RESTEasy Reactive or gRPC, Quarkus can invoke your business logic on I/O threads. +For example, when you use Quarkus REST (formerly RESTEasy Reactive) or gRPC, Quarkus can invoke your business logic on I/O threads. These threads are named https://en.wikipedia.org/wiki/Event_loop[event loops] and implement a https://en.wikipedia.org/wiki/Reactor_pattern[multi-reactor pattern]. When using the imperative model, Quarkus associates a worker thread to each processing unit (like an HTTP request or a gRPC invocation). @@ -176,7 +176,7 @@ You can mark a context _safe_. It is meant for other extensions to integrate with to help identify which contexts are isolated and guarantee access by a unique thread. Hibernate Reactive uses this feature to check if the current context is safe to store the currently opened session to protect users from mistakenly interleaving multiple reactive operations that could unintentionally share the same session. -Vert.x web will create a new duplicated context for each http web request; Quarkus RESTEasy Reactive will mark such contexts as safe. +Vert.x web will create a new duplicated context for each http web request; Quarkus REST will mark such contexts as safe. Other extensions should follow a similar pattern when they are setting up a new context that is safe to be used for a local context guaranteeing sequential use, non-concurrent access, and scoped to the current reactive chain as a convenience not to have to pass a "context" object along explicitly. In other cases, it might be helpful to mark the current context as not safe instead explicitly; for example, if an existing context needs to be shared across multiple workers to process some operations in parallel: by marking and un-marking appropriately the same @@ -203,11 +203,11 @@ In general, Quarkus invokes reactive code on duplicated contexts. So it can safely access the local data. It is the case with: -- RESTEasy Reactive +- Quarkus REST - gRPC - Reactive Routes - Vert.x Event Bus `@ConsumeEvent` -- Reactive REST Client +- REST Client - Reactive Messaging (Kafka, AMQP) - Funqy - Quarkus scheduler and Quartz diff --git a/docs/src/main/asciidoc/elasticsearch.adoc b/docs/src/main/asciidoc/elasticsearch.adoc index 5013776a04cda..6006417da1aa4 100644 --- a/docs/src/main/asciidoc/elasticsearch.adoc +++ b/docs/src/main/asciidoc/elasticsearch.adoc @@ -43,10 +43,10 @@ The elements are stored in Elasticsearch. First, we need a new project. Create a new project with the following command: :create-app-artifact-id: elasticsearch-quickstart -:create-app-extensions: resteasy-reactive-jackson,elasticsearch-rest-client +:create-app-extensions: rest-jackson,elasticsearch-rest-client include::{includes}/devtools/create-app.adoc[] -This command generates a Maven structure importing the RESTEasy Reactive, Jackson, and Elasticsearch low level REST client extensions. +This command generates a Maven structure importing the Quarkus REST (formerly RESTEasy Reactive), Jackson, and Elasticsearch low level REST client extensions. The Elasticsearch low level REST client comes with the `quarkus-elasticsearch-rest-client` extension that has been added to your build file. @@ -55,7 +55,7 @@ If you want to use the Elasticsearch Java client instead, replace the `quarkus-e [NOTE] ==== -We use the `resteasy-reactive-jackson` extension here and not the JSON-B variant because we will use the Vert.x `JsonObject` helper +We use the `rest-jackson` extension here and not the JSON-B variant because we will use the Vert.x `JsonObject` helper to serialize/deserialize our objects to/from Elasticsearch and it uses Jackson under the hood. ==== diff --git a/docs/src/main/asciidoc/extension-codestart.adoc b/docs/src/main/asciidoc/extension-codestart.adoc index 509addfa1107a..891a6e61da066 100644 --- a/docs/src/main/asciidoc/extension-codestart.adoc +++ b/docs/src/main/asciidoc/extension-codestart.adoc @@ -62,7 +62,7 @@ Each codestart consists of: - In the Quarkus core repository, the extension codestarts are all in the same https://github.com/quarkusio/quarkus/tree/main/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts[module, window="_blank"]. -- RESTEasy Reactive, RESTEasy and Spring Web extension codestarts are part of https://github.com/quarkusio/quarkus/tree/main/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts[the base codestarts, window="_blank"]. +- Quarkus REST (formerly RESTEasy Reactive), RESTEasy and Spring Web extension codestarts are part of https://github.com/quarkusio/quarkus/tree/main/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts[the base codestarts, window="_blank"]. - For other extensions, the codestart will typically be located in the runtime module (with special instruction in the `pom.xml` to generate a separate codestart artifact). @@ -316,7 +316,7 @@ public class AlohaCodestartTest { * The codestarts are all grouped in a https://github.com/quarkusio/quarkus/tree/main/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts[specific module, window="_blank"]. * No extra Maven configuration is needed. -* The https://github.com/quarkusio/quarkus/blob/main/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/runtime/src/main/resources/META-INF/quarkus-extension.yaml#L18[extension metadata, window="_blank"] references the artifact containing all the core codestarts. +* The https://github.com/quarkusio/quarkus/blob/main/extensions/resteasy-reactive/rest-qute/runtime/src/main/resources/META-INF/quarkus-extension.yaml#L18[extension metadata, window="_blank"] references the artifact containing all the core codestarts. * The tests are also https://github.com/quarkusio/quarkus/tree/main/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/quarkus[grouped, window="_blank"]. You don't need to test the build as there is a specific grouped https://github.com/quarkusio/quarkus/blob/main/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/quarkus/QuarkusCodestartBuildIT.java[test, window="_blank"] for it. e.g.: + [source,java] diff --git a/docs/src/main/asciidoc/extension-metadata.adoc b/docs/src/main/asciidoc/extension-metadata.adoc index ba9f6231b18ba..37eac75061fbe 100644 --- a/docs/src/main/asciidoc/extension-metadata.adoc +++ b/docs/src/main/asciidoc/extension-metadata.adoc @@ -22,10 +22,10 @@ in a template `META-INF/quarkus-extension.yaml` found in the extension runtime m [source,yaml,subs=attributes+] ---- -name: "RESTEasy Reactive" <1> +name: "REST" <1> artifact: ${project.groupId}:${project.artifactId}:${project.version} <2> metadata: - short-name: "resteasy-reactive" <3> + short-name: "rest" <3> keywords: <4> - "jaxrs" - "web" @@ -34,17 +34,17 @@ metadata: - "web" - "reactive" status: "stable" <6> - guide: "https://quarkus.io/guides/resteasy-reactive" <7> + guide: "https://quarkus.io/guides/rest" <7> icon-url: "https://quarkus.io/assets/images/about/icon-reactive.svg" <8> codestart: <9> - name: "resteasy-reactive" + name: "rest" languages: - "java" - "kotlin" - "scala" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" config: <10> - - "quarkus.resteasy-reactive." + - "quarkus.rest." ---- <1> Extension name displayed to users @@ -62,10 +62,10 @@ And here is the final version of the file included in the runtime JAR augmented [source,yaml,subs=attributes+] ---- -name: "RESTEasy Reactive" -artifact: "io.quarkus:quarkus-resteasy-reactive:999-SNAPSHOT" +name: "Quarkus REST (formerly RESTEasy Reactive)" +artifact: "io.quarkus:quarkus-rest:999-SNAPSHOT" metadata: - short-name: "resteasy-reactive" + short-name: "rest" keywords: - "jaxrs" - "web" @@ -74,23 +74,23 @@ metadata: - "web" - "reactive" status: "stable" - guide: "https://quarkus.io/guides/resteasy-reactive" + guide: "https://quarkus.io/guides/rest" codestart: - name: "resteasy-reactive" + name: "rest" languages: - "java" - "kotlin" - "scala" artifact: "io.quarkus:quarkus-project-core-extension-codestarts::jar:999-SNAPSHOT" config: - - "quarkus.resteasy-reactive." + - "quarkus.rest." built-with-quarkus-core: "999-SNAPSHOT" <1> capabilities: <2> provides: - "io.quarkus.rest" - "io.quarkus.resteasy.reactive" extension-dependencies: <3> - - "io.quarkus:quarkus-resteasy-reactive-common" + - "io.quarkus:quarkus-rest-common" - "io.quarkus:quarkus-mutiny" - "io.quarkus:quarkus-smallrye-context-propagation" - "io.quarkus:quarkus-vertx" diff --git a/docs/src/main/asciidoc/gcp-functions-http.adoc b/docs/src/main/asciidoc/gcp-functions-http.adoc index bb96971f19759..39d72b68a2073 100644 --- a/docs/src/main/asciidoc/gcp-functions-http.adoc +++ b/docs/src/main/asciidoc/gcp-functions-http.adoc @@ -3,7 +3,7 @@ This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// -= Google Cloud Functions (Serverless) with RESTEasy Reactive, Undertow, or Reactive Routes += Google Cloud Functions (Serverless) with Quarkus REST, Undertow, or Reactive Routes :extension-status: preview include::_attributes.adoc[] :categories: cloud @@ -11,7 +11,7 @@ include::_attributes.adoc[] :topics: google,gcp,serverless,function,cloud :extensions: io.quarkus:quarkus-google-cloud-functions-http -The `quarkus-google-cloud-functions-http` extension allows you to write microservices with RESTEasy Reactive (Jakarta REST), +The `quarkus-google-cloud-functions-http` extension allows you to write microservices with Quarkus REST (Jakarta REST), Undertow (Servlet), Reactive Routes, or xref:funqy-http.adoc[Funqy HTTP], and make these microservices deployable to the Google Cloud Functions runtime. One Google Cloud Functions deployment can represent any number of Jakarta REST, Servlet, Reactive Routes, or xref:funqy-http.adoc[Funqy HTTP] endpoints. @@ -43,7 +43,7 @@ Create an application with the `quarkus-google-cloud-functions-http` extension. You can use the following Maven command to create it: :create-app-artifact-id: google-cloud-functions-http -:create-app-extensions: google-cloud-functions-http,resteasy-reactive-jackson,undertow,reactive-routes,funqy-http +:create-app-extensions: google-cloud-functions-http,rest-jackson,undertow,reactive-routes,funqy-http include::{includes}/devtools/create-app.adoc[] == Login to Google Cloud @@ -57,7 +57,7 @@ gcloud auth login == Creating the endpoints -For this example project, we will create four endpoints, one for RESTEasy Reactive (Jakarta REST), one for Undertow (Servlet), +For this example project, we will create four endpoints, one for Quarkus REST (Jakarta REST), one for Undertow (Servlet), one for Reactive routes and one for xref:funqy-http.adoc[Funqy HTTP]. [NOTE] @@ -85,7 +85,7 @@ public class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { - return "Hello from RESTEasy Reactive"; + return "Hello from Quarkus REST"; } } ---- diff --git a/docs/src/main/asciidoc/getting-started-dev-services.adoc b/docs/src/main/asciidoc/getting-started-dev-services.adoc index cf308ec06771a..d42e2fbfc7f11 100644 --- a/docs/src/main/asciidoc/getting-started-dev-services.adoc +++ b/docs/src/main/asciidoc/getting-started-dev-services.adoc @@ -62,7 +62,7 @@ The solution is located in the `getting-started-dev-services` {quickstarts-tree- The easiest way to create a new Quarkus project is to open a terminal and run the following command: :create-app-artifact-id: getting-started-dev-services -:create-app-extensions: resteasy-reactive +:create-app-extensions: rest :create-app-code: include::{includes}/devtools/create-app.adoc[] @@ -74,7 +74,7 @@ Launch the application in dev mode include::{includes}/devtools/dev.adoc[] -Once the application is up, visit http://localhost:8080/hello. It should show a "Hello from RESTEasy Reactive" message. +Once the application is up, visit http://localhost:8080/hello. It should show a "Hello from Quarkus REST" message. === Accepting user input @@ -105,7 +105,7 @@ and replace [source, java] ---- - .body(is("Hello from RESTEasy Reactive")); + .body(is("Hello from Quarkus REST")); ---- with diff --git a/docs/src/main/asciidoc/getting-started-reactive.adoc b/docs/src/main/asciidoc/getting-started-reactive.adoc index 2d4ce722dfd11..c6ee1eef7ba2b 100644 --- a/docs/src/main/asciidoc/getting-started-reactive.adoc +++ b/docs/src/main/asciidoc/getting-started-reactive.adoc @@ -27,7 +27,7 @@ This guide will help you with: * Bootstrapping a reactive CRUD application with Quarkus * Using Hibernate Reactive with Panache to interact with a database in a reactive fashion -* Using RESTEasy Reactive to implement HTTP API while enforcing the reactive principle +* Using Quarkus REST (formerly RESTEasy Reactive) to implement HTTP API while enforcing the reactive principle * Packaging and Running the application == Prerequisites @@ -103,7 +103,7 @@ While we recommend you to follow the step-by-step instructions, you can find the First, go to https://code.quarkus.io[code.quarkus.io] and select the following extensions: -1. RESTEasy Reactive Jackson +1. Quarkus REST Jackson 2. Hibernate Reactive with Panache 3. Reactive PostgreSQL client @@ -213,7 +213,7 @@ Open http://localhost:8080/fruits to invoke this method: ---- We get the expected JSON array. -RESTEasy Reactive automatically maps the list into a JSON Array, except if instructed otherwise. +Quarkus REST automatically maps the list into a JSON Array, except if instructed otherwise. Look at the return type; it returns a `Uni` of `List`. `Uni` is an asynchronous type. diff --git a/docs/src/main/asciidoc/getting-started.adoc b/docs/src/main/asciidoc/getting-started.adoc index 6c4a754220020..93bf1921d1a18 100644 --- a/docs/src/main/asciidoc/getting-started.adoc +++ b/docs/src/main/asciidoc/getting-started.adoc @@ -64,7 +64,7 @@ The solution is located in the `getting-started` link:{quickstarts-tree-url}/get The easiest way to create a new Quarkus project is to open a terminal and run the following command: :create-app-artifact-id: getting-started -:create-app-extensions: resteasy-reactive +:create-app-extensions: rest :create-app-code: include::{includes}/devtools/create-app.adoc[] @@ -128,14 +128,14 @@ If we focus on the dependencies section, you can see the extension allowing the ---- io.quarkus - quarkus-resteasy-reactive + quarkus-rest ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-resteasy-reactive") +implementation("io.quarkus:quarkus-rest") ---- === The Jakarta REST resources @@ -157,12 +157,12 @@ public class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { - return "Hello from RESTEasy Reactive"; + return "Hello from Quarkus REST"; } } ---- -It's a very simple REST endpoint, returning "Hello from RESTEasy Reactive" to requests on "/hello". +It's a very simple REST endpoint, returning "Hello from Quarkus REST" to requests on "/hello". [TIP] .Differences with vanilla Jakarta REST @@ -196,7 +196,7 @@ Listening for transport dt_socket at address: 5005 2019-02-28 17:05:22,347 INFO [io.qua.dep.QuarkusAugmentor] (main) Beginning quarkus augmentation 2019-02-28 17:05:22,635 INFO [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 288ms 2019-02-28 17:05:22,770 INFO [io.quarkus] (main) Quarkus started in 0.668s. Listening on: http://localhost:8080 -2019-02-28 17:05:22,771 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive] +2019-02-28 17:05:22,771 INFO [io.quarkus] (main) Installed features: [cdi, rest] ---- Once started, you can request the provided endpoint: @@ -204,7 +204,7 @@ Once started, you can request the provided endpoint: [source,shell] ---- $ curl -w "\n" http://localhost:8080/hello -Hello from RESTEasy Reactive +Hello from Quarkus REST ---- Hit `CTRL+C` to stop the application, or keep it running and enjoy the blazing fast hot-reload. @@ -222,7 +222,7 @@ If you're new to CDI then we recommend you to read the xref:cdi.adoc[Introductio Quarkus only implements a subset of the CDI features and comes with non-standard features and specific APIS, you can learn more about it in the xref:cdi-reference.adoc[Contexts and Dependency Injection guide]. -ArC comes as a dependency of `quarkus-resteasy-reactive` so you already have it handy. +ArC comes as a dependency of `quarkus-rest` so you already have it handy. Let's modify the application and add a companion bean. Create the `src/main/java/org/acme/GreetingService.java` file with the following content: @@ -271,7 +271,7 @@ public class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { - return "Hello from RESTEasy Reactive"; + return "Hello from Quarkus REST"; } } ---- @@ -375,7 +375,7 @@ public class GreetingResourceTest { .when().get("/hello") .then() .statusCode(200) // <2> - .body(is("Hello from RESTEasy Reactive")); + .body(is("Hello from Quarkus REST")); } @Test diff --git a/docs/src/main/asciidoc/gradle-tooling.adoc b/docs/src/main/asciidoc/gradle-tooling.adoc index 48a2bf34d2931..c0c759a27f2e0 100644 --- a/docs/src/main/asciidoc/gradle-tooling.adoc +++ b/docs/src/main/asciidoc/gradle-tooling.adoc @@ -24,7 +24,7 @@ To scaffold a Gradle project you can either use the xref:cli-tooling.adoc[Quarku [source, bash] ---- quarkus create app my-groupId:my-artifactId \ - --extensions=resteasy-reactive,resteasy-reactive-jackson \ + --extensions=rest,rest-jackson \ --gradle ---- @@ -39,7 +39,7 @@ _For more information about how to install the Quarkus CLI and use it, please re mvn {quarkus-platform-groupid}:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=my-groupId \ -DprojectArtifactId=my-artifactId \ - -Dextensions="resteasy-reactive,resteasy-reactive-jackson" \ + -Dextensions="rest,rest-jackson" \ -DbuildTool=gradle ---- diff --git a/docs/src/main/asciidoc/grpc-getting-started.adoc b/docs/src/main/asciidoc/grpc-getting-started.adoc index 32d8d0a91fb0d..00981fdd421c7 100644 --- a/docs/src/main/asciidoc/grpc-getting-started.adoc +++ b/docs/src/main/asciidoc/grpc-getting-started.adoc @@ -46,21 +46,21 @@ implementation("io.quarkus:quarkus-grpc") By default, the `quarkus-grpc` extension relies on the reactive programming model. In this guide we will follow a reactive approach. -Under the `dependencies` section of your `pom.xml` file, make sure you have the RESTEasy Reactive dependency: +Under the `dependencies` section of your `pom.xml` file, make sure you have the Quarkus REST (formerly RESTEasy Reactive) dependency: [source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"] .pom.xml ---- io.quarkus - quarkus-resteasy-reactive + quarkus-rest ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-resteasy-reactive") +implementation("io.quarkus:quarkus-rest") ---- If you are using Maven, make sure you have the `generate-code` goal of `quarkus-maven-plugin` enabled in your `pom.xml`. diff --git a/docs/src/main/asciidoc/grpc-kubernetes.adoc b/docs/src/main/asciidoc/grpc-kubernetes.adoc index 3fc6a52ab52e2..86eb4d7f6c200 100644 --- a/docs/src/main/asciidoc/grpc-kubernetes.adoc +++ b/docs/src/main/asciidoc/grpc-kubernetes.adoc @@ -84,7 +84,7 @@ implementation("io.quarkus:quarkus-smallrye-health") TIP: More information about the health extension can be found in xref:smallrye-health.adoc[the SmallRye Health guide]. -By the default, this extension will configure the probes to use the HTTP server (which is provided by some extensions like the Quarkus RESTEasy reactive extension). Internally, this probe will also use xref:grpc-service-implementation.adoc#health[the generated gRPC Health services]. +By default, this extension will configure the probes to use the HTTP server (which is provided by some extensions like the Quarkus REST (formerly RESTEasy Reactive) extension). Internally, this probe will also use xref:grpc-service-implementation.adoc#health[the generated gRPC Health services]. If your application does not use any Quarkus extension that exposes an HTTP server, you can still configure the probes to directly use the gRPC Health service by adding the property `quarkus.kubernetes.readiness-probe.grpc-action-enabled=true` into your configuration: diff --git a/docs/src/main/asciidoc/hibernate-orm-panache.adoc b/docs/src/main/asciidoc/hibernate-orm-panache.adoc index a8fcb8a47eb32..3e15bd753e261 100644 --- a/docs/src/main/asciidoc/hibernate-orm-panache.adoc +++ b/docs/src/main/asciidoc/hibernate-orm-panache.adoc @@ -522,7 +522,7 @@ The repository pattern examples have been omitted for brevity. == Writing a Jakarta REST resource -First, include one of the RESTEasy Reactive extensions to enable Jakarta REST endpoints, for example, add the `io.quarkus:quarkus-resteasy-reactive-jackson` dependency for Jakarta REST and JSON support. +First, include one of the Quarkus REST (formerly RESTEasy Reactive) extensions to enable Jakarta REST endpoints, for example, add the `io.quarkus:quarkus-rest-jackson` dependency for Jakarta REST and JSON support. Then, you can create the following resource to create/read/update/delete your Person entity: @@ -633,14 +633,14 @@ $ curl -w "\n" http://localhost:8080/persons [{"id":1,"name":"Emily Brown","birth":"1995-09-12","status":"Alive"}, {"id":2,"name":"William Davis","birth":"1988-07-04","status":"Alive"}] ---- -NOTE: If you see the Person object as Person<1>, then the object has not been converted. In this case, add the dependency `quarkus-resteasy-reactive-jackson` in `pom.xml`. +NOTE: If you see the Person object as Person<1>, then the object has not been converted. In this case, add the dependency `quarkus-rest-jackson` in `pom.xml`. [source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"] .pom.xml ---- io.quarkus - quarkus-resteasy-reactive-jackson + quarkus-rest-jackson ---- diff --git a/docs/src/main/asciidoc/hibernate-reactive-panache.adoc b/docs/src/main/asciidoc/hibernate-reactive-panache.adoc index 5a649ea3ba2f6..846a09c177b9b 100644 --- a/docs/src/main/asciidoc/hibernate-reactive-panache.adoc +++ b/docs/src/main/asciidoc/hibernate-reactive-panache.adoc @@ -21,8 +21,8 @@ Hibernate Reactive with Panache focuses on making your entities trivial and fun Hibernate Reactive is not a replacement for xref:hibernate-orm-panache.adoc[Hibernate ORM] or the future of Hibernate ORM. It is a different stack tailored for reactive use cases where you need high-concurrency. -Furthermore, using RESTEasy Reactive, our default REST layer, does not require the use of Hibernate Reactive. -It is perfectly valid to use RESTEasy Reactive with Hibernate ORM, +Furthermore, using Quarkus REST (formerly RESTEasy Reactive), our default REST layer, does not require the use of Hibernate Reactive. +It is perfectly valid to use Quarkus REST with Hibernate ORM, and if you do not need high-concurrency, or are not accustomed to the reactive paradigm, it is recommended to use Hibernate ORM. ==== @@ -769,7 +769,7 @@ Hibernate Reactive in Quarkus currently does not support multiple persistence un First of all, most of the methods of a Panache entity must be invoked within the scope of a reactive `Mutiny.Session`. In some cases, the session is opened automatically on demand. -For example, if a Panache entity method is invoked in a Jakarta REST resource method in an application that includes the `quarkus-resteasy-reactive` extension. +For example, if a Panache entity method is invoked in a Jakarta REST resource method in an application that includes the `quarkus-rest` extension. For other cases, there are both a declarative and a programmatic way to ensure the session is opened. You can annotate a CDI business method that returns `Uni` with the `@WithSession` annotation. The method will be intercepted and the returned `Uni` will be triggered within a scope of a reactive session. diff --git a/docs/src/main/asciidoc/hibernate-reactive.adoc b/docs/src/main/asciidoc/hibernate-reactive.adoc index e63ce57c8d5f5..6a3efe3a2b594 100644 --- a/docs/src/main/asciidoc/hibernate-reactive.adoc +++ b/docs/src/main/asciidoc/hibernate-reactive.adoc @@ -19,8 +19,8 @@ and a reactive style of interaction with the database. Hibernate Reactive is not a replacement for xref:hibernate-orm.adoc[Hibernate ORM] or the future of Hibernate ORM. It is a different stack tailored for reactive use cases where you need high-concurrency. -Also, using RESTEasy Reactive, our default REST layer, does not require the use of Hibernate Reactive. -It is perfectly valid to use RESTEasy Reactive with Hibernate ORM, +Also, using Quarkus REST (formerly RESTEasy Reactive), our default REST layer, does not require the use of Hibernate Reactive. +It is perfectly valid to use Quarkus REST with Hibernate ORM, and if you do not need high-concurrency, or are not accustomed to the reactive paradigm, it is recommended to use Hibernate ORM. ==== diff --git a/docs/src/main/asciidoc/hibernate-search-orm-elasticsearch.adoc b/docs/src/main/asciidoc/hibernate-search-orm-elasticsearch.adoc index 7b36abc324337..f64c580846ecf 100644 --- a/docs/src/main/asciidoc/hibernate-search-orm-elasticsearch.adoc +++ b/docs/src/main/asciidoc/hibernate-search-orm-elasticsearch.adoc @@ -47,7 +47,7 @@ The provided solution contains a few additional elements such as tests and testi First, we need a new project. Create a new project with the following command: :create-app-artifact-id: hibernate-search-orm-elasticsearch-quickstart -:create-app-extensions: hibernate-orm-panache,jdbc-postgresql,hibernate-search-orm-elasticsearch,resteasy-reactive-jackson +:create-app-extensions: hibernate-orm-panache,jdbc-postgresql,hibernate-search-orm-elasticsearch,rest-jackson include::{includes}/devtools/create-app.adoc[] This command generates a Maven structure importing the following extensions: @@ -55,7 +55,7 @@ This command generates a Maven structure importing the following extensions: * Hibernate ORM with Panache, * the PostgreSQL JDBC driver, * Hibernate Search + Elasticsearch, - * RESTEasy Reactive and Jackson. + * Quarkus REST (formerly RESTEasy Reactive) and Jackson. If you already have your Quarkus project configured, you can add the `hibernate-search-orm-elasticsearch` extension to your project by running the following command in your project base directory: diff --git a/docs/src/main/asciidoc/infinispan-client.adoc b/docs/src/main/asciidoc/infinispan-client.adoc index 3e8ccc48ca277..0d696e677dcce 100644 --- a/docs/src/main/asciidoc/infinispan-client.adoc +++ b/docs/src/main/asciidoc/infinispan-client.adoc @@ -37,7 +37,7 @@ The solution is located in the `infinispan-client-quickstart` link:{quickstarts- First, we need a new project. Create a new project with the following command: :create-app-artifact-id: infinispan-client-quickstart -:create-app-extensions: infinispan-client,resteasy-reactive +:create-app-extensions: infinispan-client,rest include::{includes}/devtools/create-app.adoc[] This command generates a new project, importing the Infinispan Client extension. diff --git a/docs/src/main/asciidoc/jms.adoc b/docs/src/main/asciidoc/jms.adoc index 76eb8d70649ef..c1f285e5c3384 100644 --- a/docs/src/main/asciidoc/jms.adoc +++ b/docs/src/main/asciidoc/jms.adoc @@ -55,7 +55,7 @@ or download an https://github.com/amqphub/quarkus-qpid-jms-quickstart/archive/ma First, we need a new project. Create a new project with the following command: :create-app-artifact-id: jms-quickstart -:create-app-extensions: resteasy-reactive,qpid-jms +:create-app-extensions: rest,qpid-jms include::{includes}/devtools/create-app.adoc[] This command generates a new project importing the quarkus-qpid-jms extension: @@ -349,7 +349,7 @@ The Artemis JMS solution is located in the `jms-quickstart` link:{quickstarts-tr Create a new project with the following command: :create-app-artifact-id: jms-quickstart -:create-app-extensions: resteasy-reactive,artemis-jms +:create-app-extensions: rest,artemis-jms include::{includes}/devtools/create-app.adoc[] This creates a new project importing the quarkus-artemis-jms extension: diff --git a/docs/src/main/asciidoc/kafka-reactive-getting-started.adoc b/docs/src/main/asciidoc/kafka-reactive-getting-started.adoc index dddebeb5a07c1..ab03e6bfab1f0 100644 --- a/docs/src/main/asciidoc/kafka-reactive-getting-started.adoc +++ b/docs/src/main/asciidoc/kafka-reactive-getting-started.adoc @@ -52,13 +52,13 @@ First, we need to create two projects: the _producer_ and the _processor_. To create the _producer_ project, in a terminal run: :create-app-artifact-id: kafka-quickstart-producer -:create-app-extensions: resteasy-reactive-jackson,smallrye-reactive-messaging-kafka +:create-app-extensions: rest-jackson,smallrye-reactive-messaging-kafka :create-app-post-command: include::{includes}/devtools/create-app.adoc[] This command creates the project structure and selects two Quarkus extensions we will be using: -1. RESTEasy Reactive and its Jackson support (to handle JSON) to serve the HTTP endpoint. +1. Quarkus REST (formerly RESTEasy Reactive) and its Jackson support (to handle JSON) to serve the HTTP endpoint. 2. The Kafka connector for Reactive Messaging To create the _processor_ project, from the same directory, run: diff --git a/docs/src/main/asciidoc/kafka-schema-registry-avro.adoc b/docs/src/main/asciidoc/kafka-schema-registry-avro.adoc index 224a81fbe682e..268b558c1434b 100644 --- a/docs/src/main/asciidoc/kafka-schema-registry-avro.adoc +++ b/docs/src/main/asciidoc/kafka-schema-registry-avro.adoc @@ -49,7 +49,7 @@ The solution is located in the `kafka-avro-schema-quickstart` link:{quickstarts- First, we need a new project. Create a new project with the following command: :create-app-artifact-id: kafka-avro-schema-quickstart -:create-app-extensions: resteasy-reactive-jackson,smallrye-reactive-messaging-kafka,apicurio-registry-avro +:create-app-extensions: rest-jackson,smallrye-reactive-messaging-kafka,apicurio-registry-avro include::{includes}/devtools/create-app.adoc[] [TIP] @@ -416,7 +416,7 @@ First, let's add test dependencies on REST Client and Awaitility to the build fi io.quarkus - quarkus-rest-client-reactive + quarkus-rest-client test @@ -429,7 +429,7 @@ First, let's add test dependencies on REST Client and Awaitility to the build fi [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -testImplementation("io.quarkus:quarkus-rest-client-reactive") +testImplementation("io.quarkus:quarkus-rest-client") testImplementation("org.awaitility:awaitility") ---- @@ -742,7 +742,7 @@ Also, you need to add a few dependencies and a custom Maven repository to your ` io.quarkus - quarkus-rest-client-reactive + quarkus-rest-client io.confluent @@ -786,7 +786,7 @@ dependencies { implementation("io.quarkus:quarkus-confluent-registry-avro") // Confluent registry libraries use Jakarta REST client - implementation("io.quarkus:quarkus-rest-client-reactive") + implementation("io.quarkus:quarkus-rest-client") implementation("io.confluent:kafka-avro-serializer:7.2.0") { exclude group: "jakarta.ws.rs", module: "jakarta.ws.rs-api" diff --git a/docs/src/main/asciidoc/kafka-schema-registry-json-schema.adoc b/docs/src/main/asciidoc/kafka-schema-registry-json-schema.adoc index 3a4308a8e3b91..88c164eabb646 100644 --- a/docs/src/main/asciidoc/kafka-schema-registry-json-schema.adoc +++ b/docs/src/main/asciidoc/kafka-schema-registry-json-schema.adoc @@ -49,7 +49,7 @@ The solution is located in the `kafka-json-schema-quickstart` link:{quickstarts- First, we need a new project. Create a new project with the following command: :create-app-artifact-id: kafka-json-schema-quickstart -:create-app-extensions: resteasy-reactive-jackson,smallrye-reactive-messaging-kafka,apicurio-registry-json-schema +:create-app-extensions: rest-jackson,smallrye-reactive-messaging-kafka,apicurio-registry-json-schema include::{includes}/devtools/create-app.adoc[] [TIP] @@ -444,7 +444,7 @@ First, let's add test dependencies on REST Client and Awaitility to the build fi io.quarkus - quarkus-rest-client-reactive + quarkus-rest-client test @@ -457,7 +457,7 @@ First, let's add test dependencies on REST Client and Awaitility to the build fi [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -testImplementation("io.quarkus:quarkus-rest-client-reactive") +testImplementation("io.quarkus:quarkus-rest-client") testImplementation("org.awaitility:awaitility") ---- @@ -770,7 +770,7 @@ Also, you need to add a few dependencies and a custom Maven repository to your ` io.quarkus - quarkus-rest-client-reactive + quarkus-rest-client io.confluent @@ -814,7 +814,7 @@ dependencies { implementation("io.quarkus:quarkus-confluent-registry-json-schema") // Confluent registry libraries use Jakarta REST client - implementation("io.quarkus:quarkus-rest-client-reactive") + implementation("io.quarkus:quarkus-rest-client") implementation("io.confluent:kafka-json-schema-serializer:7.2.0") { exclude group: "jakarta.ws.rs", module: "jakarta.ws.rs-api" diff --git a/docs/src/main/asciidoc/kafka-streams.adoc b/docs/src/main/asciidoc/kafka-streams.adoc index 28f940e4a9e3a..2a9ed7cf5a7b9 100644 --- a/docs/src/main/asciidoc/kafka-streams.adoc +++ b/docs/src/main/asciidoc/kafka-streams.adoc @@ -233,11 +233,11 @@ which will run the Kafka Streams pipeline. Create another project like so: :create-app-artifact-id: kafka-streams-quickstart-aggregator -:create-app-extensions: kafka-streams,resteasy-reactive-jackson +:create-app-extensions: kafka-streams,rest-jackson :create-app-post-command: mv kafka-streams-quickstart-aggregator aggregator include::{includes}/devtools/create-app.adoc[] -This creates the `aggregator` project with the Quarkus extension for Kafka Streams and with the Jackson support for RESTEasy Reactive. +This creates the `aggregator` project with the Quarkus extension for Kafka Streams and with the Jackson support for Quarkus REST (formerly RESTEasy Reactive). If you already have your Quarkus project configured, you can add the `kafka-streams` extension to your project by running the following command in your project base directory: diff --git a/docs/src/main/asciidoc/kafka.adoc b/docs/src/main/asciidoc/kafka.adoc index 35255f98a82a7..d9e913df1c87b 100644 --- a/docs/src/main/asciidoc/kafka.adoc +++ b/docs/src/main/asciidoc/kafka.adoc @@ -211,7 +211,7 @@ in this example exposing it as a Server-Sent Events endpoint. [NOTE] ==== When consuming messages with `@Channel`, the application code is responsible for the subscription. -In the example above, the RESTEasy Reactive endpoint handles that for you. +In the example above, the Quarkus REST (formerly RESTEasy Reactive) endpoint handles that for you. ==== Following types can be injected as channels: @@ -2944,7 +2944,7 @@ This makes sure that managed entity is not impacted by the Kafka serialization. To send to Kafka entities managed by Hibernate Reactive, we recommend using: -* RESTEasy Reactive to serve HTTP requests +* Quarkus REST to serve HTTP requests * A `MutinyEmitter` to send message to a channel, so it can be easily integrated with the Mutiny API exposed by Hibernate Reactive or Hibernate Reactive with Panache. The following example demonstrates how to receive a payload, store it in the database using Hibernate Reactive with Panache, and send the persisted entity to Kafka: @@ -3050,7 +3050,7 @@ perform database updates and commit the Kafka transaction only if the database t The following example demonstrates: -* Receive a payload by serving HTTP requests using RESTEasy Reactive, +* Receive a payload by serving HTTP requests using Quarkus REST, * Limit concurrency of that HTTP endpoint using Smallrye Fault Tolerance, * Start a Kafka transaction and send the payload to Kafka record, * Store the payload in the database using Hibernate Reactive with Panache, diff --git a/docs/src/main/asciidoc/kotlin.adoc b/docs/src/main/asciidoc/kotlin.adoc index 0d7bc89658eb4..4ba737b70e8da 100644 --- a/docs/src/main/asciidoc/kotlin.adoc +++ b/docs/src/main/asciidoc/kotlin.adoc @@ -25,13 +25,13 @@ NB: For Gradle project setup please see below, and for further reference consult First, we need a new Kotlin project. This can be done using the following command: :create-app-artifact-id: rest-kotlin-quickstart -:create-app-extensions: kotlin,resteasy-reactive-jackson +:create-app-extensions: kotlin,rest-jackson :create-app-code: include::{includes}/devtools/create-app.adoc[] When adding `kotlin` to the extensions list, the Maven plugin will generate a project that is properly configured to work with Kotlin. Furthermore, the `org.acme.ReactiveGreetingResource` class is implemented as Kotlin source code (as is the case with the generated tests). -The addition of `resteasy-reactive-jackson` in the extension list results in importing the RESTEasy Reactive and Jackson extensions. +The addition of `rest-jackson` in the extension list results in importing the Quarkus REST (formerly RESTEasy Reactive) and Jackson extensions. `ReactiveGreetingResource` looks like this: @@ -50,7 +50,7 @@ class ReactiveGreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) - fun hello() = "Hello from RESTEasy Reactive" + fun hello() = "Hello from Quarkus REST" } ---- @@ -209,8 +209,8 @@ dependencies { implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") - implementation 'io.quarkus:quarkus-resteasy-reactive' - implementation 'io.quarkus:quarkus-resteasy-reactive-jackson' + implementation 'io.quarkus:quarkus-rest' + implementation 'io.quarkus:quarkus-rest-jackson' implementation 'io.quarkus:quarkus-kotlin' testImplementation 'io.quarkus:quarkus-junit5' @@ -279,8 +279,8 @@ dependencies { implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")) implementation("io.quarkus:quarkus-kotlin") - implementation("io.quarkus:quarkus-resteasy-reactive") - implementation("io.quarkus:quarkus-resteasy-reactive-jackson") + implementation("io.quarkus:quarkus-rest") + implementation("io.quarkus:quarkus-rest-jackson") testImplementation("io.quarkus:quarkus-junit5") testImplementation("io.rest-assured:rest-assured") @@ -417,7 +417,7 @@ include::{includes}/devtools/build-native.adoc[] [[kotlin-jackson]] == Kotlin and Jackson -If the `com.fasterxml.jackson.module:jackson-module-kotlin` dependency and the `quarkus-jackson` extension (or one of the `quarkus-resteasy-jackson` or `quarkus-resteasy-reactive-jackson` extensions) have been added to the project, +If the `com.fasterxml.jackson.module:jackson-module-kotlin` dependency and the `quarkus-jackson` extension (or one of the `quarkus-resteasy-jackson` or `quarkus-rest-jackson` extensions) have been added to the project, then Quarkus automatically registers the `KotlinModule` to the `ObjectMapper` bean (see xref:rest-json.adoc#jackson[this] guide for more details). When using Kotlin data classes with `native-image` you may experience serialization errors that do not occur with the `JVM` version, despite the Kotlin Jackson Module being registered. This is especially so if you have a more complex JSON hierarchy, where an issue on a lower node causes a serialization failure. The error message displayed is a catch-all and typically displays an issue with the root object, which may not necessarily be the case. @@ -486,10 +486,10 @@ The following extensions provide support for Kotlin Coroutines by allowing the u |=== |Extension |Comments -|`quarkus-resteasy-reactive` +|`quarkus-rest` |Support is provided for Jakarta REST Resource Methods -|`quarkus-rest-client-reactive` +|`quarkus-rest-client` |Support is provided for REST Client interface methods |`quarkus-smallrye-reactive-messaging` diff --git a/docs/src/main/asciidoc/lra.adoc b/docs/src/main/asciidoc/lra.adoc index b03df4a2bcf31..383ca26d49280 100644 --- a/docs/src/main/asciidoc/lra.adoc +++ b/docs/src/main/asciidoc/lra.adoc @@ -81,7 +81,7 @@ implementation("io.quarkus:quarkus-resteasy-client-jackson") [IMPORTANT] ==== `quarkus-narayana-lra` needs to be complemented with a server Jakarta REST implementation and a REST Client implementation in order to work. -This means that users should also have either `quarkus-resteasy-jackson` and `quarkus-rest-client-jackson` or `quarkus-resteasy-reactive-jackson` and `quarkus-resteasy-client-reactive-jackson` dependencies in their application. +This means that users should also have either `quarkus-resteasy-jackson` and `quarkus-resteasy-client-jackson` or `quarkus-rest-jackson` and `quarkus-rest-client-jackson` dependencies in their application. ==== If there is a running coordinator then this is all you need in order to create diff --git a/docs/src/main/asciidoc/mailer.adoc b/docs/src/main/asciidoc/mailer.adoc index bb93a40e8b29a..1ca7161aadb0a 100644 --- a/docs/src/main/asciidoc/mailer.adoc +++ b/docs/src/main/asciidoc/mailer.adoc @@ -45,12 +45,12 @@ The solution is located in the `mailer-quickstart` link:{quickstarts-tree-url}/m First, we need a new project. Create a new project with the following command: :create-app-artifact-id: mailer-quickstart -:create-app-extensions: resteasy-reactive,mailer,qute +:create-app-extensions: rest,mailer,qute include::{includes}/devtools/create-app.adoc[] This command generates a Maven structure including the following extensions: - * RESTEasy Reactive used to expose REST endpoints + * Quarkus REST (formerly RESTEasy Reactive) used to expose REST endpoints * Mailer so that we can send emails * Qute, our template engine @@ -119,7 +119,7 @@ public class MailResource { <1> Configure the root path of our HTTP endpoint <2> Inject the `Mailer` object managed by Quarkus <3> Create a method that will handle the HTTP GET request on `/mail` -<4> Because we are using RESTEasy Reactive and the _imperative_ mailer, we need to add the `@Blocking` annotation. We will see later the reactive variant. +<4> Because we are using Quarkus REST and the _imperative_ mailer, we need to add the `@Blocking` annotation. We will see later the reactive variant. <5> Create a `Mail` object by configuring the _to_ recipient, the subject and body The `MailResource` class implements the HTTP API exposed by our application. diff --git a/docs/src/main/asciidoc/maven-tooling.adoc b/docs/src/main/asciidoc/maven-tooling.adoc index 55958a8b97966..a3ecc8d5d0564 100644 --- a/docs/src/main/asciidoc/maven-tooling.adoc +++ b/docs/src/main/asciidoc/maven-tooling.adoc @@ -427,7 +427,7 @@ $ ./mvnw verify -Dnative [INFO] Running org.acme.quickstart.GreetingResourceIT Executing [/Users/starksm/Dev/JBoss/Quarkus/starksm64-quarkus-quickstarts/getting-started-native/target/quarkus-quickstart-runner, -Dquarkus.http.port=8081, -Dtest.url=http://localhost:8081, -Dquarkus.log.file.path=target/quarkus.log] 2019-02-28 16:52:42,020 INFO [io.quarkus] (main) Quarkus started in 0.007s. Listening on: http://localhost:8080 -2019-02-28 16:52:42,021 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive] +2019-02-28 16:52:42,021 INFO [io.quarkus] (main) Installed features: [cdi, rest] [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.081 s - in org.acme.quickstart.GreetingResourceIT [INFO] [INFO] Results: @@ -1052,8 +1052,6 @@ the `-f` argument, if it was specified. [[project-info]] == Quarkus project info -NOTE: This goal was introduced in Quarkus Maven plugin 2.7.0.Final and can be used in projects that are based on Quarkus version 2.0.0.Final or later. - The Quarkus Maven plugin includes a goal called `info` (currently marked as 'experimental') that logs Quarkus-specific information about the project, such as: the imported Quarkus platform BOMs and the Quarkus extensions found among the project dependencies. In a multi-module project `quarkus:info` will assume that the current module, in which it is executed, is the main module of the application. @@ -1076,13 +1074,13 @@ Here is an example `info` output for a simple project: [INFO] {quarkus-platform-groupid}:quarkus-camel-bom:pom:{quarkus-version} [INFO] [INFO] Extensions from {quarkus-platform-groupid}:quarkus-bom: <2> -[INFO] io.quarkus:quarkus-resteasy-reactive +[INFO] io.quarkus:quarkus-rest [INFO] [INFO] Extensions from {quarkus-platform-groupid}:quarkus-camel-bom: <3> [INFO] org.apache.camel.quarkus:camel-quarkus-rabbitmq [INFO] [INFO] Extensions from registry.quarkus.io: <4> -[INFO] io.quarkiverse.prettytime:quarkus-prettytime:0.2.1 +[INFO] io.quarkiverse.prettytime:quarkus-prettytime:2.0.1 ---- <1> Quarkus platform BOMs imported in the project (BOMs imported by parent POMs will also be reported) @@ -1095,7 +1093,7 @@ NOTE: `quarkus:info` will also report Quarkus extensions that aren't found in th [[project-info-misaligned]] === Highlighting misaligned versions -`quarkus:info` will also highlight basic Quarkus dependency version misalignments, in case they are detected. For example, if we modify the project mentioned above by removing the `camel-quarkus-rabbitmq` extension from the dependencies and adding a `2.6.3.Final` `` element to the `quarkus-resteasy-reactive` dependency that is managed by the `quarkus-bom` and then run `quarkus:info` again, we'll see something like: +`quarkus:info` will also highlight basic Quarkus dependency version misalignments, in case they are detected. For example, if we modify the project mentioned above by removing the `camel-quarkus-rabbitmq` extension from the dependencies and adding a `2.6.3.Final` `` element to the `quarkus-rest` dependency that is managed by the `quarkus-bom` and then run `quarkus:info` again, we'll see something like: [source,text,subs=attributes+] ---- @@ -1112,7 +1110,7 @@ NOTE: `quarkus:info` will also report Quarkus extensions that aren't found in th [INFO] org.apache.camel.quarkus:camel-quarkus-rabbitmq [INFO] [INFO] Extensions from registry.quarkus.io: -[INFO] io.quarkiverse.prettytime:quarkus-prettytime:0.2.1 +[INFO] io.quarkiverse.prettytime:quarkus-prettytime:2.0.1 [INFO] [WARNING] Non-recommended Quarkus platform BOM and/or extension versions were found. For more details, please, execute 'mvn quarkus:update -Drectify' ---- @@ -1122,8 +1120,6 @@ NOTE: `quarkus:info` will also report Quarkus extensions that aren't found in th [[project-update]] == Quarkus project update -NOTE: This goal was introduced in Quarkus Maven plugin 2.7.0.Final and can be used in projects that are based on Quarkus version 2.0.0.Final or later. - The `quarkus:update` goal (currently marked as 'experimental') provided by the Quarkus Maven plugin can be used to check whether there are Quarkus-related updates available for a project, such as: new releases of the relevant Quarkus platform BOMs and non-platform Quarkus extensions present in the project. In a multi-module project the `update` goal is meant to be executed from the main Quarkus application module. IMPORTANT: At this point, the `quarkus:update` goal does not actually apply the recommended updates but simply reports what they are and how to apply them manually. diff --git a/docs/src/main/asciidoc/messaging-virtual-threads.adoc b/docs/src/main/asciidoc/messaging-virtual-threads.adoc index 0e45e064e41cd..1569da634f025 100644 --- a/docs/src/main/asciidoc/messaging-virtual-threads.adoc +++ b/docs/src/main/asciidoc/messaging-virtual-threads.adoc @@ -84,7 +84,7 @@ or to use the Quarkus Dev mode, insert the following to the `quarkus-maven-plugi ---- Then you can start using the annotation `@RunOnVirtualThread` on your consumer methods also annotated with `@Incoming`. -In the following example we'll use the xref:rest-client-reactive.adoc[RESTEasy Reactive REST Client] to make a blocking call to a REST endpoint: +In the following example we'll use the xref:rest-client.adoc[REST Client] to make a blocking call to a REST endpoint: [source, java] ---- diff --git a/docs/src/main/asciidoc/mongodb-panache.adoc b/docs/src/main/asciidoc/mongodb-panache.adoc index 91fc8f82f1cb1..35c583a5d3354 100644 --- a/docs/src/main/asciidoc/mongodb-panache.adoc +++ b/docs/src/main/asciidoc/mongodb-panache.adoc @@ -67,10 +67,10 @@ The solution is located in the `mongodb-panache-quickstart` link:{quickstarts-tr First, we need a new project. Create a new project with the following command: :create-app-artifact-id: mongodb-panache-quickstart -:create-app-extensions: resteasy-reactive-jackson,mongodb-panache +:create-app-extensions: rest-jackson,mongodb-panache include::{includes}/devtools/create-app.adoc[] -This command generates a Maven structure importing the RESTEasy Reactive Jackson and MongoDB with Panache extensions. +This command generates a Maven structure importing the Quarkus REST (formerly RESTEasy Reactive) Jackson and MongoDB with Panache extensions. After this, the `quarkus-mongodb-panache` extension has been added to your build file. If you don't want to generate a new project, add the dependency in your build file: @@ -449,7 +449,7 @@ The repository pattern examples have been omitted for brevity. == Writing a Jakarta REST resource -First, include one of the RESTEasy extensions to enable Jakarta REST endpoints, for example, add the `io.quarkus:quarkus-resteasy-reactive-jackson` dependency for Jakarta REST and JSON support. +First, include one of the RESTEasy extensions to enable Jakarta REST endpoints, for example, add the `io.quarkus:quarkus-rest-jackson` dependency for Jakarta REST and JSON support. Then, you can create the following resource to create/read/update/delete your Person entity: @@ -814,7 +814,7 @@ you need to provide the value by yourself. ==== `ObjectId` can be difficult to use if you want to expose its value in your REST service. -So we created Jackson and JSON-B providers to serialize/deserialize them as a `String` which are automatically registered if your project depends on either the RESTEasy Reactive Jackson extension or the RESTEasy Reactive JSON-B extension. +So we created Jackson and JSON-B providers to serialize/deserialize them as a `String` which are automatically registered if your project depends on either the Quarkus REST Jackson extension or the Quarkus REST JSON-B extension. [IMPORTANT] ==== @@ -983,11 +983,11 @@ Uni deleted = ReactivePerson.deleteById(personId); Uni updated = ReactivePerson.update("name", "Mortal").where("status", Status.Alive); ---- -TIP: If you use MongoDB with Panache in conjunction with RESTEasy Reactive, you can directly return a reactive type inside your Jakarta REST resource endpoint. +TIP: If you use MongoDB with Panache in conjunction with Quarkus REST, you can directly return a reactive type inside your Jakarta REST resource endpoint. The same query facility exists for the reactive types, but the `stream()` methods act differently: they return a `Multi` (which implement a reactive stream `Publisher`) instead of a `Stream`. -It allows more advanced reactive use cases, for example, you can use it to send server-sent events (SSE) via RESTEasy Reactive: +It allows more advanced reactive use cases, for example, you can use it to send server-sent events (SSE) via Quarkus REST: [source,java] ---- @@ -1006,7 +1006,7 @@ public Multi streamPersons() { } ---- -TIP: `@RestStreamElementType(MediaType.APPLICATION_JSON)` tells RESTEasy Reactive to serialize the object in JSON. +TIP: `@RestStreamElementType(MediaType.APPLICATION_JSON)` tells Quarkus REST to serialize the object in JSON. === Reactive transactions diff --git a/docs/src/main/asciidoc/mongodb.adoc b/docs/src/main/asciidoc/mongodb.adoc index 91f52129ce13c..6093e86a9af16 100644 --- a/docs/src/main/asciidoc/mongodb.adoc +++ b/docs/src/main/asciidoc/mongodb.adoc @@ -41,10 +41,10 @@ The solution is located in the `mongodb-quickstart` link:{quickstarts-tree-url}/ First, we need a new project. Create a new project with the following command: :create-app-artifact-id: mongodb-quickstart -:create-app-extensions: resteasy-reactive-jackson,mongodb-client +:create-app-extensions: rest-jackson,mongodb-client include::{includes}/devtools/create-app.adoc[] -This command generates a Maven structure importing the RESTEasy Reactive Jackson and MongoDB Client extensions. +This command generates a Maven structure importing the Quarkus REST (formerly RESTEasy Reactive) Jackson and MongoDB Client extensions. After this, the `quarkus-mongodb-client` extension has been added to your build file. If you already have your Quarkus project configured, you can add the `mongodb-client` extension diff --git a/docs/src/main/asciidoc/mutiny-primer.adoc b/docs/src/main/asciidoc/mutiny-primer.adoc index 69c1c429af5ba..81d5ec2905b26 100644 --- a/docs/src/main/asciidoc/mutiny-primer.adoc +++ b/docs/src/main/asciidoc/mutiny-primer.adoc @@ -39,7 +39,7 @@ If you want to know more about Mutiny, and the concepts behind it, check https:/ == Mutiny in Quarkus Mutiny is the primary API when dealing with the reactive features from Quarkus. -It means that most extensions support Mutiny either by exposing an API returning Unis and Multis (such as reactive data sources or rest clients) or understanding when your methods return a Uni or a Multi (such as RESTEasy Reactive or Reactive Messaging). +It means that most extensions support Mutiny either by exposing an API returning Unis and Multis (such as reactive data sources or rest clients) or understanding when your methods return a Uni or a Multi (such as Quarkus REST (formerly RESTEasy Reactive) or Reactive Messaging). These integrations make Mutiny a prominent and cohesive model for every reactive application developed with Quarkus. In addition, Mutiny architecture allows fine-grain dead-code elimination which improves the memory usage when compiled to native (such as with Quarkus native mode or GraalVM native image compiler). @@ -169,7 +169,7 @@ The subscriber receives item events, a failure event, or a completion event when Subscribing to a Uni or a Multi is essential, as without it, the operation is never executed. In Quarkus some extensions deal with the subscription for you. -For example, in RESTEasy Reactive your HTTP methods can return a Uni or a Multi, and RESTEasy Reactive handles the subscription. +For example, in Quarkus REST your HTTP methods can return a Uni or a Multi, and Quarkus REST handles the subscription. == Mutiny Patterns diff --git a/docs/src/main/asciidoc/native-and-ssl.adoc b/docs/src/main/asciidoc/native-and-ssl.adoc index 142c5aedd3101..41a3c00bd1578 100644 --- a/docs/src/main/asciidoc/native-and-ssl.adoc +++ b/docs/src/main/asciidoc/native-and-ssl.adoc @@ -107,7 +107,7 @@ As SSL is de facto the standard nowadays, we decided to enable its support autom * the Reactive client for Microsoft SQL Server extension (`quarkus-reactive-mssql-client`), * the Redis client extension (`quarkus-redis-client`), * the RESTEasy Classic REST Client extension (`quarkus-resteasy-client`), - * the REST Client Reactive extension (`quarkus-rest-client-reactive`), + * the REST Client extension (`quarkus-rest-client`), * the SmallRye GraphQL Client extension (`quarkus-smallrye-graphql-client`), * the Spring Cloud Config client extension (`quarkus-spring-cloud-config-client`), * the Vault extension (`quarkus-vault`), diff --git a/docs/src/main/asciidoc/native-reference.adoc b/docs/src/main/asciidoc/native-reference.adoc index fe4cc0980cbb1..09cc190e96950 100644 --- a/docs/src/main/asciidoc/native-reference.adoc +++ b/docs/src/main/asciidoc/native-reference.adoc @@ -476,7 +476,7 @@ __ ____ __ _____ ___ __ ____ ______ --\___\_\____/_/ |_/_/|_/_/|_|\____/___/ 2023-02-09 18:02:32,794 INFO [io.quarkus] (main) code-with-quarkus 1.0.0-SNAPSHOT native (powered by Quarkus 2.16.1.Final) started in 0.011s. Listening on: http://0.0.0.0:8080 2023-02-09 18:02:32,794 INFO [io.quarkus] (main) Profile prod activated. -2023-02-09 18:02:32,794 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, smallrye-context-propagation, vertx] +2023-02-09 18:02:32,794 INFO [io.quarkus] (main) Installed features: [cdi, rest, smallrye-context-propagation, vertx] ---- Once the startup has complete, @@ -566,7 +566,7 @@ Open a terminal and run the following command: For Linux & MacOS users :create-app-artifact-id: debugging-native -:create-app-extensions: resteasy-reactive,container-image-docker +:create-app-extensions: rest,container-image-docker :create-app-code: include::{includes}/devtools/create-app.adoc[] diff --git a/docs/src/main/asciidoc/openapi-swaggerui.adoc b/docs/src/main/asciidoc/openapi-swaggerui.adoc index 22f2de5d34a61..a97150ad81572 100644 --- a/docs/src/main/asciidoc/openapi-swaggerui.adoc +++ b/docs/src/main/asciidoc/openapi-swaggerui.adoc @@ -36,7 +36,7 @@ The solution is located in the `openapi-swaggerui-quickstart` link:{quickstarts- First, we need a new project. Create a new project with the following command: :create-app-artifact-id: openapi-swaggerui-quickstart -:create-app-extensions: resteasy-reactive-jackson +:create-app-extensions: rest-jackson include::{includes}/devtools/create-app.adoc[] == Expose a REST Resource diff --git a/docs/src/main/asciidoc/opentelemetry.adoc b/docs/src/main/asciidoc/opentelemetry.adoc index b61c3542cfe75..e202ca612b444 100644 --- a/docs/src/main/asciidoc/opentelemetry.adoc +++ b/docs/src/main/asciidoc/opentelemetry.adoc @@ -47,7 +47,7 @@ The solution is located in the `opentelemetry-quickstart` link:{quickstarts-tree First, we need a new project. Create a new project with the following command: :create-app-artifact-id: opentelemetry-quickstart -:create-app-extensions: resteasy-reactive,quarkus-opentelemetry +:create-app-extensions: rest,quarkus-opentelemetry include::{includes}/devtools/create-app.adoc[] This command generates the Maven project and imports the `quarkus-opentelemetry` extension, @@ -639,10 +639,10 @@ Additional exporters will be available in the Quarkiverse https://github.com/qua * https://quarkus.io/extensions/io.quarkus/quarkus-agroal[`quarkus-agroal`] * https://quarkus.io/guides/grpc-getting-started[`quarkus-grpc`] -* https://quarkus.io/extensions/io.quarkus/quarkus-jaxrs-client-reactive[`quarkus-jaxrs-client-reactive`] +* https://quarkus.io/extensions/io.quarkus/quarkus-rest-client-jaxrs[`quarkus-rest-client-jaxrs`] +* https://quarkus.io/guides/rest[`quarkus-rest`] * https://quarkus.io/guides/resteasy[`quarkus-resteasy-jackson`] -* https://quarkus.io/guides/resteasy-reactive[`quarkus-resteasy-reactive`] -* https://quarkus.io/guides/rest-client[`quarkus-resteasy-client`] +* https://quarkus.io/guides/resteasy-client[`quarkus-resteasy-client`] * https://quarkus.io/guides/scheduler[`quarkus-scheduler`] * https://quarkus.io/guides/smallrye-graphql[`quarkus-smallrye-graphql`] * https://quarkus.io/extensions/io.quarkus/quarkus-smallrye-reactive-messaging[`quarkus-smallrye-reactive-messaging`] diff --git a/docs/src/main/asciidoc/performance-measure.adoc b/docs/src/main/asciidoc/performance-measure.adoc index cd05214955e56..3141b259f653e 100644 --- a/docs/src/main/asciidoc/performance-measure.adoc +++ b/docs/src/main/asciidoc/performance-measure.adoc @@ -191,7 +191,7 @@ $ date +"%T.%3N" && ./target/quarkus-timing-runner 10:57:32.508 10:57:32.512 2019-04-05 10:57:32,512 INFO [io.quarkus] (main) Quarkus 0.11.0 started in 0.002s. Listening on: http://127.0.0.1:8080 -2019-04-05 10:57:32,512 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, resteasy-reactive-jackson] +2019-04-05 10:57:32,512 INFO [io.quarkus] (main) Installed features: [cdi, rest, rest-jackson] 10:57:32.537 ---- diff --git a/docs/src/main/asciidoc/pulsar-getting-started.adoc b/docs/src/main/asciidoc/pulsar-getting-started.adoc index c775deabf1e30..e4aa51ed2485f 100644 --- a/docs/src/main/asciidoc/pulsar-getting-started.adoc +++ b/docs/src/main/asciidoc/pulsar-getting-started.adoc @@ -52,13 +52,13 @@ First, we need to create two projects: the _producer_ and the _processor_. To create the _producer_ project, in a terminal run: :create-app-artifact-id: pulsar-quickstart-producer -:create-app-extensions: resteasy-reactive-jackson,smallrye-reactive-messaging-pulsar +:create-app-extensions: rest-jackson,smallrye-reactive-messaging-pulsar :create-app-post-command: include::{includes}/devtools/create-app.adoc[] This command creates the project structure and selects two Quarkus extensions we will be using: -1. RESTEasy Reactive and its Jackson support (to handle JSON) to serve the HTTP endpoint. +1. Quarkus REST (formerly RESTEasy Reactive) and its Jackson support (to handle JSON) to serve the HTTP endpoint. 2. The Pulsar connector for Reactive Messaging To create the _processor_ project, from the same directory, run: diff --git a/docs/src/main/asciidoc/pulsar.adoc b/docs/src/main/asciidoc/pulsar.adoc index 0e1297ff71f15..f1888dc09a1d8 100644 --- a/docs/src/main/asciidoc/pulsar.adoc +++ b/docs/src/main/asciidoc/pulsar.adoc @@ -237,7 +237,7 @@ public class PriceResource { [NOTE] ==== When consuming messages with `@Channel`, the application code is responsible for the subscription. -In the example above, the RESTEasy Reactive endpoint handles that for you. +In the example above, the Quarkus REST (formerly RESTEasy Reactive) endpoint handles that for you. ==== Following types can be injected as channels: diff --git a/docs/src/main/asciidoc/quarkus-reactive-architecture.adoc b/docs/src/main/asciidoc/quarkus-reactive-architecture.adoc index 8e1056f21fee0..0a5b87c403d6f 100644 --- a/docs/src/main/asciidoc/quarkus-reactive-architecture.adoc +++ b/docs/src/main/asciidoc/quarkus-reactive-architecture.adoc @@ -147,7 +147,7 @@ Thanks to hints in your code (such as the `@Blocking` and `@NonBlocking` annotat If we go back to the HTTP endpoint example from above, the HTTP request is always received on an I/O thread. Then, the extension dispatching that request to your code decides whether to call it on the I/O thread, avoiding thread switches, or on a worker thread. This decision depends on the extension. -For example, the RESTEasy Reactive extension uses the `@Blocking` annotation to determine if the method needs to be invoked using a worker thread, or if it can be invoked using the I/O thread. +For example, the Quarkus REST (formerly RESTEasy Reactive) extension uses the `@Blocking` annotation to determine if the method needs to be invoked using a worker thread, or if it can be invoked using the I/O thread. Quarkus is pragmatic and versatile. You decide how to develop and execute your application. @@ -162,10 +162,10 @@ Quarkus adds new features in every release, and the https://github.com/quarkiver === HTTP -* RESTEasy Reactive: an implementation of Jakarta REST tailored for the Quarkus architecture. +* Quarkus REST: an implementation of Jakarta REST tailored for the Quarkus architecture. It follows a reactive-first approach but allows imperative code using the `@Blocking` annotation. * Reactive Routes: a declarative way to register HTTP routes directly on the Vert.x router used by Quarkus to route HTTP requests to methods. -* Reactive Rest Client: allows consuming HTTP endpoints. +* REST Client: allows consuming HTTP endpoints. Under the hood, it uses the non-blocking I/O features from Quarkus. * Qute - the Qute template engine exposes a reactive API to render templates in a non-blocking manner. diff --git a/docs/src/main/asciidoc/quartz.adoc b/docs/src/main/asciidoc/quartz.adoc index 4c76a5449c0f7..bfdf94fc25eef 100644 --- a/docs/src/main/asciidoc/quartz.adoc +++ b/docs/src/main/asciidoc/quartz.adoc @@ -41,7 +41,7 @@ The solution is located in the `quartz-quickstart` link:{quickstarts-tree-url}/q First, we need a new project. Create a new project with the following command: :create-app-artifact-id: quartz-quickstart -:create-app-extensions: resteasy-reactive-jackson,quartz,hibernate-orm-panache,flyway,jdbc-postgresql +:create-app-extensions: rest-jackson,quartz,hibernate-orm-panache,flyway,jdbc-postgresql include::{includes}/devtools/create-app.adoc[] It generates: diff --git a/docs/src/main/asciidoc/qute-reference.adoc b/docs/src/main/asciidoc/qute-reference.adoc index 799ac39c1b0bb..15bb2afcec94f 100644 --- a/docs/src/main/asciidoc/qute-reference.adoc +++ b/docs/src/main/asciidoc/qute-reference.adoc @@ -11,7 +11,7 @@ include::_attributes.adoc[] :sectnums: :sectnumlevels: 4 :topics: templating,qute -:extensions: io.quarkus:quarkus-qute,io.quarkus:quarkus-resteasy-qute,io.quarkus:quarkus-resteasy-reactive-qute +:extensions: io.quarkus:quarkus-qute,io.quarkus:quarkus-resteasy-qute,io.quarkus:quarkus-rest-qute Qute is a templating engine designed specifically to meet the Quarkus needs. The usage of reflection is minimized to reduce the size of native images. @@ -2551,19 +2551,19 @@ If you are using the traditional `quakus-resteasy` extension, then in your `pom. ---- -If instead you are using RESTEasy Reactive via the `quarkus-resteasy-reactive` extension, then in your `pom.xml` file, add: +If instead you are using Quarkus REST (formerly RESTEasy Reactive) via the `quarkus-rest` extension, then in your `pom.xml` file, add: [source,xml] ---- io.quarkus - quarkus-resteasy-reactive-qute + quarkus-rest-qute ---- Both of these extensions register a special response filter which enables resource methods to return a `TemplateInstance`, thus freeing users of having to take care of all necessary internal steps. -NOTE: If using RESTEasy Reactive, a resource method that returns `TemplateInstance` is considered non-blocking. You need to annotate the method with `io.smallrye.common.annotation.Blocking` in order to mark the method as blocking. For example if it's also annotated with `@RunOnVirtualThread`. +NOTE: If using Quarkus REST, a resource method that returns `TemplateInstance` is considered non-blocking. You need to annotate the method with `io.smallrye.common.annotation.Blocking` in order to mark the method as blocking. For example if it's also annotated with `@RunOnVirtualThread`. The end result is that a using Qute within a Jakarta REST resource may look as simple as: diff --git a/docs/src/main/asciidoc/qute.adoc b/docs/src/main/asciidoc/qute.adoc index 00a841fda1e1e..e2947d7d4b57d 100644 --- a/docs/src/main/asciidoc/qute.adoc +++ b/docs/src/main/asciidoc/qute.adoc @@ -8,7 +8,7 @@ include::_attributes.adoc[] :categories: miscellaneous :summary: Learn more about how you can use templating in your applications with the Qute template engine. :topics: templating,qute -:extensions: io.quarkus:quarkus-qute,io.quarkus:quarkus-resteasy-qute,io.quarkus:quarkus-resteasy-reactive-qute +:extensions: io.quarkus:quarkus-qute,io.quarkus:quarkus-resteasy-qute,io.quarkus:quarkus-rest-qute Qute is a templating engine designed specifically to meet the Quarkus needs. The usage of reflection is minimized to reduce the size of native images. @@ -30,21 +30,21 @@ The solution is located in the `qute-quickstart` link:{quickstarts-tree-url}/qut If you want to use Qute in your Jakarta REST application, you need to add an extension first: -* either `quarkus-resteasy-reactive-qute` if you are using RESTEasy Reactive: +* either `quarkus-rest-qute` if you are using Quarkus REST (formerly RESTEasy Reactive): + [source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"] .pom.xml ---- io.quarkus - quarkus-resteasy-reactive-qute + quarkus-rest-qute ---- + [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-resteasy-reactive-qute") +implementation("io.quarkus:quarkus-rest-qute") ---- * or `quarkus-resteasy-qute` if you are using RESTEasy Classic: @@ -298,7 +298,7 @@ public class ItemResource { <1> Declare a method that gives us a `TemplateInstance` for `templates/ItemResource/item.html` and declare its `Item item` parameter so we can validate the template. <2> Make the `Item` object accessible in the template. -NOTE: When the `--parameters` compiler argument is enabled, RESTEasy Reactive may infer the parameter names from the method argument names, making the `@PathParam("id")` annotation optional in this case. +NOTE: When the `--parameters` compiler argument is enabled, Quarkus REST may infer the parameter names from the method argument names, making the `@PathParam("id")` annotation optional in this case. === Template parameter declaration inside the template itself diff --git a/docs/src/main/asciidoc/rabbitmq.adoc b/docs/src/main/asciidoc/rabbitmq.adoc index 3dc3caa368282..5a8d023ef2cd8 100644 --- a/docs/src/main/asciidoc/rabbitmq.adoc +++ b/docs/src/main/asciidoc/rabbitmq.adoc @@ -54,14 +54,14 @@ First, we need to create two projects: the _producer_ and the _processor_. To create the _producer_ project, in a terminal run: :create-app-artifact-id: rabbitmq-quickstart-producer -:create-app-extensions: smallrye-reactive-messaging-rabbitmq,resteasy-reactive-jackson +:create-app-extensions: smallrye-reactive-messaging-rabbitmq,rest-jackson :create-app-post-command: include::{includes}/devtools/create-app.adoc[] This command creates the project structure and select the two Quarkus extensions we will be using: 1. The Reactive Messaging RabbitMQ connector -2. RESTEasy Reactive and its Jackson support to handle JSON payloads +2. Quarkus REST (formerly RESTEasy Reactive) and its Jackson support to handle JSON payloads [TIP] ==== diff --git a/docs/src/main/asciidoc/reactive-event-bus.adoc b/docs/src/main/asciidoc/reactive-event-bus.adoc index d0c2f3bc2ab52..6622a1e7acecd 100644 --- a/docs/src/main/asciidoc/reactive-event-bus.adoc +++ b/docs/src/main/asciidoc/reactive-event-bus.adoc @@ -30,7 +30,7 @@ This mechanism uses the Vert.x EventBus, so you need to enable the `vertx` exten If you are creating a new project, set the `extensions` parameter as follows: :create-app-artifact-id: vertx-quickstart -:create-app-extensions: vertx,resteasy-reactive +:create-app-extensions: vertx,rest include::{includes}/devtools/create-app.adoc[] If you have an already created project, the `vertx` extension can be added to an existing Quarkus project with @@ -297,7 +297,7 @@ This message is consumed by another bean and the response is sent using the _rep First create a new project using: :create-app-artifact-id: vertx-http-quickstart -:create-app-extensions: vertx,resteasy-reactive +:create-app-extensions: vertx,rest include::{includes}/devtools/create-app.adoc[] You can already start the application in _dev mode_ using: diff --git a/docs/src/main/asciidoc/reactive-routes.adoc b/docs/src/main/asciidoc/reactive-routes.adoc index 6dd76ecb21f89..c8e5a0cfe866b 100644 --- a/docs/src/main/asciidoc/reactive-routes.adoc +++ b/docs/src/main/asciidoc/reactive-routes.adoc @@ -18,7 +18,7 @@ You can implement REST API with routes only or combine them with Jakarta REST re The code presented in this guide is available in this {quickstarts-base-url}[GitHub repository] under the link:{quickstarts-tree-url}/reactive-routes-quickstart[`reactive-routes-quickstart` directory] NOTE: Reactive Routes were initially introduced to provide a reactive execution model for HTTP APIs on top of the xref:quarkus-reactive-architecture.adoc[Quarkus Reactive Architecture]. -With the introduction of xref:resteasy-reactive.adoc[RESTEasy Reactive], you can now implement reactive HTTP APIs and still use Jakarta REST annotations. +With the introduction of xref:rest.adoc[Quarkus REST (formerly RESTEasy Reactive)], you can now implement reactive HTTP APIs and still use Jakarta REST annotations. Reactive Routes are still supported, especially if you want a more _route-based_ approach, and something closer to the underlying reactive engine. == Quarkus HTTP @@ -663,7 +663,7 @@ Check the https://vertx.io/docs/vertx-web/java/#_basic_vert_x_web_concepts[Vert. [NOTE] ==== `Router` access is provided by the `quarkus-vertx-http` extension. -If you use `quarkus-resteasy-reactive` or `quarkus-reactive-routes`, the extension will be added automatically. +If you use `quarkus-rest` or `quarkus-reactive-routes`, the extension will be added automatically. ==== You can also receive the Mutiny variant of the Router (`io.vertx.mutiny.ext.web.Router`): diff --git a/docs/src/main/asciidoc/reactive-sql-clients.adoc b/docs/src/main/asciidoc/reactive-sql-clients.adoc index 4bc2423e03e52..8cf98e36d58e8 100644 --- a/docs/src/main/asciidoc/reactive-sql-clients.adoc +++ b/docs/src/main/asciidoc/reactive-sql-clients.adoc @@ -77,7 +77,7 @@ First, make sure your project has the `quarkus-reactive-pg-client` extension ena If you are creating a new project, use the following command: :create-app-artifact-id: reactive-pg-client-quickstart -:create-app-extensions: resteasy-reactive,reactive-pg-client +:create-app-extensions: rest,reactive-pg-client include::{includes}/devtools/create-app.adoc[] If you have an already created project, the `reactive-pg-client` extension can be added to an existing Quarkus project with the `add-extension` command: @@ -104,7 +104,7 @@ implementation("io.quarkus:quarkus-reactive-pg-client") === Mutiny -RESTEasy Reactive includes supports for Mutiny types (e.g. `Uni` and `Multi`) out of the box. +Quarkus REST (formerly RESTEasy Reactive) includes supports for Mutiny types (e.g. `Uni` and `Multi`) out of the box. [TIP] ==== @@ -115,9 +115,9 @@ If you are not familiar with Mutiny, check xref:mutiny-primer.adoc[Mutiny - an i === JSON Binding We will expose `Fruit` instances over HTTP in the JSON format. -Consequently, you also need to add the `quarkus-resteasy-reactive-jackson` extension: +Consequently, you also need to add the `quarkus-rest-jackson` extension: -:add-extension-extensions: resteasy-reactive-jackson +:add-extension-extensions: rest-jackson include::{includes}/devtools/extension-add.adoc[] If you prefer not to use the command line, manually add the dependency to your build file: @@ -127,14 +127,14 @@ If you prefer not to use the command line, manually add the dependency to your b ---- io.quarkus - quarkus-resteasy-reactive-jackson + quarkus-rest-jackson ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-resteasy-reactive-jackson") +implementation("io.quarkus:quarkus-rest-jackson") ---- Of course, this is only a requirement for this guide, not any application using the Reactive PostgreSQL Client. diff --git a/docs/src/main/asciidoc/redis.adoc b/docs/src/main/asciidoc/redis.adoc index 12afc6a99e075..470ac83034693 100644 --- a/docs/src/main/asciidoc/redis.adoc +++ b/docs/src/main/asciidoc/redis.adoc @@ -41,7 +41,7 @@ The solution is located in the `redis-quickstart` link:{quickstarts-tree-url}/re First, we need a new project. Create a new project with the following command: :create-app-artifact-id: redis-quickstart -:create-app-extensions: redis-client,resteasy-reactive-jackson +:create-app-extensions: redis-client,rest-jackson include::{includes}/devtools/create-app.adoc[] This command generates a new project, importing the Redis extension. diff --git a/docs/src/main/asciidoc/rest-client-reactive.adoc b/docs/src/main/asciidoc/rest-client.adoc similarity index 92% rename from docs/src/main/asciidoc/rest-client-reactive.adoc rename to docs/src/main/asciidoc/rest-client.adoc index 7203210e58b95..db4a80fc9b8b0 100644 --- a/docs/src/main/asciidoc/rest-client-reactive.adoc +++ b/docs/src/main/asciidoc/rest-client.adoc @@ -6,14 +6,14 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc = Using the REST Client include::_attributes.adoc[] :categories: web -:summary: This guide explains how to use the RESTEasy Reactive REST Client. +:summary: This guide explains how to use the REST Client. :topics: rest,rest-client,resteasy-reactive -:extensions: io.quarkus:quarkus-rest-client-reactive,io.quarkus:quarkus-rest-client-reactive-jackson,io.quarkus:quarkus-rest-client-reactive-jsonb +:extensions: io.quarkus:quarkus-rest-client,io.quarkus:quarkus-rest-client-jackson,io.quarkus:quarkus-rest-client-jsonb -This guide explains how to use the REST Client Reactive in order to interact with REST APIs. -REST Client Reactive is the REST Client implementation compatible with RESTEasy Reactive. +This guide explains how to use the REST Client in order to interact with REST APIs. +REST Client is the REST Client implementation compatible with Quarkus REST (formerly RESTEasy Reactive). -If your application uses a client and exposes REST endpoints, please use xref:resteasy-reactive.adoc[RESTEasy Reactive] +If your application uses a client and exposes REST endpoints, please use xref:rest.adoc[Quarkus REST] for the server part. == Prerequisites @@ -27,22 +27,22 @@ However, you can go right to the completed example. Clone the Git repository: `git clone {quickstarts-clone-url}`, or download an {quickstarts-archive-url}[archive]. -The solution is located in the `rest-client-reactive-quickstart` link:{quickstarts-tree-url}/rest-client-reactive-quickstart[directory]. +The solution is located in the `rest-client-quickstart` link:{quickstarts-tree-url}/rest-client-quickstart[directory]. == Creating the Maven project First, we need a new project. Create a new project with the following command: -:create-app-artifact-id: rest-client-reactive-quickstart -:create-app-extensions: resteasy-reactive-jackson,rest-client-reactive-jackson +:create-app-artifact-id: rest-client-quickstart +:create-app-extensions: rest-jackson,rest-client-jackson include::{includes}/devtools/create-app.adoc[] This command generates the Maven project with a REST endpoint and imports: -* the `resteasy-reactive-jackson` extension for the REST server support. Use `resteasy-reactive` instead if you do not wish to use Jackson; -* the `rest-client-reactive-jackson` extension for the REST client support. Use `rest-client-reactive` instead if you do not wish to use Jackson +* the `rest-jackson` extension for the REST server support. Use `rest` instead if you do not wish to use Jackson; +* the `rest-client-jackson` extension for the REST client support. Use `rest-client` instead if you do not wish to use Jackson -If you already have your Quarkus project configured, you can add the `rest-client-reactive-jackson` extension +If you already have your Quarkus project configured, you can add the `rest-client-jackson` extension to your project by running the following command in your project base directory: :add-extension-extensions: rest-client-reactive-jackson @@ -55,14 +55,14 @@ This will add the following to your build file: ---- io.quarkus - quarkus-rest-client-reactive-jackson + quarkus-rest-client-jackson ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-rest-client-reactive-jackson") +implementation("io.quarkus:quarkus-rest-client-jackson") ---- == Setting up the model @@ -92,7 +92,7 @@ The model above is only a subset of the fields provided by the service, but it s == Create the interface -Using the REST Client Reactive is as simple as creating an interface using the proper Jakarta REST and MicroProfile annotations. In our case the interface should be created at `src/main/java/org/acme/rest/client/ExtensionsService.java` and have the following content: +Using the REST Client is as simple as creating an interface using the proper Jakarta REST and MicroProfile annotations. In our case the interface should be created at `src/main/java/org/acme/rest/client/ExtensionsService.java` and have the following content: [source, java] ---- @@ -124,7 +124,7 @@ CDI injection as a REST Client [NOTE] ==== -When the `quarkus-rest-client-reactive-jackson` extension is installed, Quarkus will use the `application/json` media type +When the `quarkus-rest-client-jackson` extension is installed, Quarkus will use the `application/json` media type by default for most return values, unless the media type is explicitly set via `@Produces` or `@Consumes` annotations. If you don't rely on the JSON default, it is heavily recommended to annotate your endpoints with the `@Produces` and `@Consumes` annotations to define precisely the expected content-types. @@ -221,7 +221,7 @@ Note that if an interface method contains an argument annotated with `@QueryPara priority over anything specified in any `@ClientQueryParam` annotation. ==== -More information about this annotation can be found on the javadoc of link:https://javadoc.io/doc/io.quarkus/quarkus-rest-client-reactive/latest/io/quarkus/rest/client/reactive/ClientQueryParam.html[`@ClientQueryParam`]. +More information about this annotation can be found on the javadoc of link:https://javadoc.io/doc/io.quarkus/quarkus-rest-client/latest/io/quarkus/rest/client/reactive/ClientQueryParam.html[`@ClientQueryParam`]. === Form Parameters @@ -296,7 +296,7 @@ public interface Client { } ---- -More information about this annotation can be found on the javadoc of link:https://javadoc.io/doc/io.quarkus/quarkus-rest-client-reactive/latest/io/quarkus/rest/client/reactive/ClientFormParam.html[`@ClientFormParam`]. +More information about this annotation can be found on the javadoc of link:https://javadoc.io/doc/io.quarkus/quarkus-rest-client/latest/io/quarkus/rest/client/reactive/ClientFormParam.html[`@ClientFormParam`]. === Path Parameters @@ -330,7 +330,7 @@ public interface ExtensionsService { MultipartForm can be built using the Class `ClientMultipartForm` which supports building the form as needed: -`ClientMultipartForm` can be programmatically created with custom inputs and/or from `MultipartFormDataInput` and/or from custom Resteasy Reactive Input annotated with `@RestForm` if received. +`ClientMultipartForm` can be programmatically created with custom inputs and/or from `MultipartFormDataInput` and/or from custom Quarkus REST Input annotated with `@RestForm` if received. [source, java] ---- @@ -379,7 +379,7 @@ public ClientMultipartForm buildClientMultipartForm(MultipartFormDataInput input } ---- -<1> `MultipartFormDataInput` inputForm supported by RestEasy Reactive (Server). +<1> `MultipartFormDataInput` inputForm supported by Quarkus REST (Server). <2> Creating a `ClientMultipartForm` object to populate with various dataparts. <3> Adding InMemory `FileItem` to `ClientMultipartForm` <4> Adding physical `FileItem` to `ClientMultipartForm` @@ -430,7 +430,7 @@ quarkus.rest-client."org.acme.rest.client.ExtensionsService".url=https://stage.c ---- <1> Having this configuration means that all requests performed using `org.acme.rest.client.ExtensionsService` will use `https://stage.code.quarkus.io/api` as the base URL. -Using the configuration above, calling the `getById` method of `ExtensionsService` with a value of `io.quarkus:quarkus-rest-client-reactive` would result in an HTTP GET request being made to `https://stage.code.quarkus.io/api/extensions?id=io.quarkus:quarkus-rest-client-reactive`. +Using the configuration above, calling the `getById` method of `ExtensionsService` with a value of `io.quarkus:quarkus-rest-client` would result in an HTTP GET request being made to `https://stage.code.quarkus.io/api/extensions?id=io.quarkus:quarkus-rest-client`. Note that `org.acme.rest.client.ExtensionsService` _must_ match the fully qualified name of the `ExtensionsService` interface we created in the previous section. @@ -610,14 +610,14 @@ public class ExtensionsResource { == Use Custom HTTP Options -The REST Client Reactive internally uses https://vertx.io/docs/apidocs/io/vertx/core/http/HttpClient.html[the Vert.x HTTP Client] to make the network connections. The REST Client Reactive extensions allows configuring some settings via properties, for example: +The REST Client internally uses https://vertx.io/docs/apidocs/io/vertx/core/http/HttpClient.html[the Vert.x HTTP Client] to make the network connections. The REST Client extensions allows configuring some settings via properties, for example: - `quarkus.rest-client.client-prefix.connect-timeout` to configure the connect timeout in milliseconds. - `quarkus.rest-client.client-prefix.max-redirects` to limit the number of redirects. However, there are many more options within the Vert.x HTTP Client to configure the connections. See all the options in the Vert.x HTTP Client Options API in https://vertx.io/docs/apidocs/io/vertx/core/http/HttpClientOptions.html[this link]. -To fully customize the Vert.x HTTP Client instance that the REST Client Reactive is internally using, you can provide your custom HTTP Client Options instance via CDI or when programmatically creating your client. +To fully customize the Vert.x HTTP Client instance that the REST Client is internally using, you can provide your custom HTTP Client Options instance via CDI or when programmatically creating your client. Let's see an example about how to provide the HTTP Client Options via CDI: @@ -793,12 +793,12 @@ public class ExtensionsResourceTest { @Test public void testExtensionsIdEndpoint() { given() - .when().get("/extension/id/io.quarkus:quarkus-rest-client-reactive") + .when().get("/extension/id/io.quarkus:quarkus-rest-client") .then() .statusCode(200) .body("$.size()", is(1), - "[0].id", is("io.quarkus:quarkus-rest-client-reactive"), - "[0].name", is("REST Client Reactive"), + "[0].id", is("io.quarkus:quarkus-rest-client"), + "[0].name", is("REST Client"), "[0].keywords.size()", greaterThan(1), "[0].keywords", hasItem("rest-client")); } @@ -811,7 +811,7 @@ The code above uses link:https://rest-assured.io/[REST Assured]'s link:https://g [[async-support]] == Async Support -To get the full power of the reactive nature of the client, you can use the non-blocking flavor of REST Client Reactive extension, +To get the full power of the reactive nature of the client, you can use the non-blocking flavor of REST Client extension, which comes with support for `CompletionStage` and `Uni`. Let's see it in action by adding a `getByIdAsync` method in our `ExtensionsService` REST interface. The code should look like: @@ -875,7 +875,7 @@ public class ExtensionsResource { Please note that since the invocation is now non-blocking, the `idAsync` method will be invoked on the event loop, i.e. will not get offloaded to a worker pool thread and thus reducing hardware resource utilization. -See xref:resteasy-reactive.adoc#execution-model[Resteasy reactive execution model] for more details. +See xref:rest.adoc#execution-model[Quarkus REST execution model] for more details. To test asynchronous methods, add the test method below in `ExtensionsResourceTest`: @@ -884,12 +884,12 @@ To test asynchronous methods, add the test method below in `ExtensionsResourceTe @Test public void testExtensionIdAsyncEndpoint() { given() - .when().get("/extension/id-async/io.quarkus:quarkus-rest-client-reactive") + .when().get("/extension/id-async/io.quarkus:quarkus-rest-client") .then() .statusCode(200) .body("$.size()", is(1), - "[0].id", is("io.quarkus:quarkus-rest-client-reactive"), - "[0].name", is("REST Client Reactive"), + "[0].id", is("io.quarkus:quarkus-rest-client"), + "[0].name", is("REST Client"), "[0].keywords.size()", greaterThan(1), "[0].keywords", hasItem("rest-client")); } @@ -1244,7 +1244,7 @@ org.eclipse.microprofile.rest.client.propagateHeaders=Authorization,Proxy-Author == Customizing the request -The REST Client Reactive supports further customization of the final request to be sent to the server via filters. The filters must implement either the interface `ClientRequestFilter` or `ResteasyReactiveClientRequestFilter`. +The REST Client supports further customization of the final request to be sent to the server via filters. The filters must implement either the interface `ClientRequestFilter` or `ResteasyReactiveClientRequestFilter`. A simple example of customizing the request would be to add a custom header: @@ -1315,11 +1315,11 @@ public class TestClientRequestFilter implements ResteasyReactiveClientRequestFil } ---- -== Customizing the ObjectMapper in REST Client Reactive Jackson +== Customizing the ObjectMapper in REST Client Jackson -The REST Client Reactive supports adding a custom ObjectMapper to be used only the Client using the annotation `@ClientObjectMapper`. +The REST Client supports adding a custom ObjectMapper to be used only the Client using the annotation `@ClientObjectMapper`. -A simple example is to provide a custom ObjectMapper to the REST Client Reactive Jackson extension by doing: +A simple example is to provide a custom ObjectMapper to the REST Client Jackson extension by doing: [source, java] ---- @@ -1466,11 +1466,11 @@ public interface EchoClient { [[multipart]] == Multipart Form support -REST Client Reactive support multipart messages. +REST Client support multipart messages. === Sending Multipart messages -REST Client Reactive allows sending data as multipart forms. This way you can for example +REST Client allows sending data as multipart forms. This way you can for example send files efficiently. To send data as a multipart form, you can just use the regular `@RestForm` (or `@FormParam`) annotations: @@ -1511,7 +1511,7 @@ NOTE: If there are `@RestForm` parameters that are not multipart-implying, then `@Consumes(MediaType.APPLICATION_FORM_URLENCODED)` is implied. There are a few modes in which the form data can be encoded. By default, -Rest Client Reactive uses RFC1738. +REST Client uses RFC1738. You can override it by specifying the mode either on the client level, by setting `io.quarkus.rest.client.multipart-post-encoder-mode` RestBuilder property to the selected value of `HttpPostRequestEncoder.EncoderMode` or @@ -1535,7 +1535,7 @@ You can also send JSON multiparts by specifying the `@PartType` annotation: ---- === Receiving Multipart Messages -REST Client Reactive also supports receiving multipart messages. +REST Client also supports receiving multipart messages. As with sending, to parse a multipart response, you need to create a class that describes the response data, e.g. [source,java] @@ -1567,7 +1567,7 @@ At the moment, multipart response support is subject to the following limitation - files sent in multipart responses can only be parsed to `File`, `Path` and `FileDownload` - each field of the response type has to be annotated with `@PartType` - fields without this annotation are ignored -REST Client Reactive needs to know the classes used as multipart return types upfront. If you have an interface method that produces `multipart/form-data`, the return type will be discovered automatically. However, if you intend to use the `ClientBuilder` API to parse a response as multipart, you need to annotate your DTO class with `@MultipartForm`. +REST Client needs to know the classes used as multipart return types upfront. If you have an interface method that produces `multipart/form-data`, the return type will be discovered automatically. However, if you intend to use the `ClientBuilder` API to parse a response as multipart, you need to annotate your DTO class with `@MultipartForm`. WARNING: The files you download are not automatically removed and can take up a lot of disk space. Consider removing the files when you are done working with them. @@ -1604,11 +1604,11 @@ The code uses the following pieces: As previously mentioned, the body parameter needs to be properly crafted by the application code to conform to the service's requirements. === Receiving compressed messages -REST Client Reactive also supports receiving compressed messages using GZIP. You can enable the HTTP compression support by adding the property `quarkus.http.enable-compression=true`. -When this feature is enabled and a server returns a response that includes the header `Content-Encoding: gzip`, REST Client Reactive will automatically decode the content and proceed with the message handling. +REST Client also supports receiving compressed messages using GZIP. You can enable the HTTP compression support by adding the property `quarkus.http.enable-compression=true`. +When this feature is enabled and a server returns a response that includes the header `Content-Encoding: gzip`, REST Client will automatically decode the content and proceed with the message handling. == Proxy support -REST Client Reactive supports sending requests through a proxy. +REST Client supports sending requests through a proxy. It honors the JVM settings for it but also allows to specify both: * global client proxy settings, with `quarkus.rest-client.proxy-address`, `quarkus.rest-client.proxy-user`, `quarkus.rest-client.proxy-password`, `quarkus.rest-client.non-proxy-hosts` @@ -1646,7 +1646,7 @@ Run the application with: include::{includes}/devtools/dev.adoc[] -Open your browser to http://localhost:8080/extension/id/io.quarkus:quarkus-rest-client-reactive. +Open your browser to http://localhost:8080/extension/id/io.quarkus:quarkus-rest-client. You should see a JSON object containing some basic information about this extension. @@ -1661,7 +1661,7 @@ You can also generate the native executable with: include::{includes}/devtools/build-native.adoc[] == Logging traffic -REST Client Reactive can log the requests it sends and the responses it receives. +REST Client can log the requests it sends and the responses it receives. To enable logging, add the `quarkus.rest-client.logging.scope` property to your `application.properties` and set it to: * `request-response` to log the request and response contents, or @@ -1669,7 +1669,7 @@ To enable logging, add the `quarkus.rest-client.logging.scope` property to your As HTTP messages can have large bodies, we limit the amount of body characters logged. The default limit is `100`, you can change it by specifying `quarkus.rest-client.logging.body-limit`. -NOTE: REST Client Reactive is logging the traffic with level DEBUG and does not alter logger properties. You may need to adjust your logger configuration to use this feature. +NOTE: REST Client is logging the traffic with level DEBUG and does not alter logger properties. You may need to adjust your logger configuration to use this feature. An example logging configuration: @@ -1683,7 +1683,7 @@ quarkus.log.category."org.jboss.resteasy.reactive.client.logging".level=DEBUG [TIP] ==== -REST Client Reactive uses a default `ClientLogger` implementation, which can be swapped out for a custom implementation. +REST Client uses a default `ClientLogger` implementation, which can be swapped out for a custom implementation. When setting up the client programmatically using the `QuarkusRestClientBuilder`, the `ClientLogger` is set via the `clientLogger` method. @@ -1870,12 +1870,12 @@ public class WireMockExtensions implements QuarkusTestResourceLifecycleManager { wireMockServer = new WireMockServer(); wireMockServer.start(); // <3> - wireMockServer.stubFor(get(urlEqualTo("/extensions?id=io.quarkus:quarkus-rest-client-reactive")) // <4> + wireMockServer.stubFor(get(urlEqualTo("/extensions?id=io.quarkus:quarkus-rest-client")) // <4> .willReturn(aResponse() .withHeader("Content-Type", "application/json") .withBody( "[{" + - "\"id\": \"io.quarkus:quarkus-rest-client-reactive\"," + + "\"id\": \"io.quarkus:quarkus-rest-client\"," + "\"name\": \"REST Client\"" + "}]" ))); @@ -1897,7 +1897,7 @@ public class WireMockExtensions implements QuarkusTestResourceLifecycleManager { <1> Statically importing the methods in the Wiremock package makes it easier to read the test. <2> The `start` method is invoked by Quarkus before any test is run and returns a `Map` of configuration properties that apply during the test execution. <3> Launch Wiremock. -<4> Configure Wiremock to stub the calls to `/extensions?id=io.quarkus:quarkus-rest-client-reactive` by returning a specific canned response. +<4> Configure Wiremock to stub the calls to `/extensions?id=io.quarkus:quarkus-rest-client` by returning a specific canned response. <5> All HTTP calls that have not been stubbed are handled by calling the real service. This is done for demonstration purposes, as it is not something that would usually happen in a real test. <6> As the `start` method returns configuration that applies for tests, we set the rest-client property that controls the base URL which is used by the implementation of `ExtensionsService` to the base URL where Wiremock is listening for incoming requests. @@ -1921,10 +1921,11 @@ public class ExtensionsResourceTest { ==== == Known limitations -While the REST Client Reactive extension aims to be a drop-in replacement for the REST Client extension, there are some differences + +While the REST Client extension aims to be a drop-in replacement for the RESTEasy Client extension, there are some differences and limitations: -- the default scope of the client for the new extension is `@ApplicationScoped` while the `quarkus-rest-client` defaults to `@Dependent` +- the default scope of the client for the new extension is `@ApplicationScoped` while the `quarkus-resteasy-client` defaults to `@Dependent` To change this behavior, set the `quarkus.rest-client-reactive.scope` property to the fully qualified scope name. - it is not possible to set `HostnameVerifier` or `SSLContext` - a few things that don't make sense for a non-blocking implementations, such as setting the `ExecutorService`, don't work diff --git a/docs/src/main/asciidoc/rest-data-panache.adoc b/docs/src/main/asciidoc/rest-data-panache.adoc index 210afc6168505..5d7c5ef30e2da 100644 --- a/docs/src/main/asciidoc/rest-data-panache.adoc +++ b/docs/src/main/asciidoc/rest-data-panache.adoc @@ -44,7 +44,7 @@ Please, check out the next compatibility table to use the right one according to * Add the required dependencies to your build file ** Hibernate ORM REST Data with Panache extension (`quarkus-hibernate-orm-rest-data-panache`) ** A JDBC driver extension (`quarkus-jdbc-postgresql`, `quarkus-jdbc-h2`, `quarkus-jdbc-mariadb`, ...) -** One of the RESTEasy JSON serialization extensions (the extension supports both RESTEasy Classic and RESTEasy Reactive) +** One of the RESTEasy JSON serialization extensions (the extension supports both Quarkus REST (formerly RESTEasy Reactive) and RESTEasy Classic) [source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"] .pom.xml @@ -58,10 +58,10 @@ Please, check out the next compatibility table to use the right one according to quarkus-jdbc-postgresql - + io.quarkus - quarkus-resteasy-reactive-jackson + quarkus-rest-jackson @@ -79,8 +79,8 @@ Please, check out the next compatibility table to use the right one according to implementation("io.quarkus:quarkus-hibernate-orm-rest-data-panache") implementation("io.quarkus:quarkus-jdbc-postgresql") -// Use this if you are using RESTEasy Reactive -implementation("io.quarkus:quarkus-resteasy-reactive-jackson") +// Use this if you are using Quarkus REST +implementation("io.quarkus:quarkus-rest-jackson") // Use this if you are going to use RESTEasy Classic // implementation("io.quarkus:quarkus-resteasy-jackson") @@ -97,7 +97,7 @@ To see the Hibernate ORM REST Data with Panache in action, you can check out the * Add the required dependencies to your `pom.xml` ** Hibernate Reactive REST Data with Panache extension (`quarkus-hibernate-reactive-rest-data-panache`) ** A Vert.x reactive database driver extension (`quarkus-reactive-pg-client`, `quarkus-reactive-mysql-client`, ...) -** One of the RESTEasy Reactive serialization extensions (`quarkus-resteasy-reactive-jsonb`, `quarkus-resteasy-reactive-jackson`, ...) +** One of the Quarkus REST serialization extensions (`quarkus-rest-jsonb`, `quarkus-rest-jackson`, ...) [source,xml] ---- @@ -110,10 +110,10 @@ To see the Hibernate ORM REST Data with Panache in action, you can check out the io.quarkus quarkus-reactive-pg-client - + io.quarkus - quarkus-resteasy-reactive-jackson + quarkus-rest-jackson ---- @@ -126,7 +126,7 @@ To see the Hibernate ORM REST Data with Panache in action, you can check out the * Add the required dependencies to your build file ** MongoDB REST Data with Panache extension (`quarkus-mongodb-rest-data-panache`) -** One of the RESTEasy JSON serialization extensions (`quarkus-resteasy-reactive-jackson` or `quarkus-resteasy-reactive-jsonb`) +** One of the RESTEasy JSON serialization extensions (`quarkus-rest-jackson` or `quarkus-rest-jsonb`) [source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"] .pom.xml @@ -136,10 +136,10 @@ To see the Hibernate ORM REST Data with Panache in action, you can check out the quarkus-mongodb-rest-data-panache - + io.quarkus - quarkus-resteasy-reactive-jackson + quarkus-rest-jackson @@ -156,8 +156,8 @@ To see the Hibernate ORM REST Data with Panache in action, you can check out the ---- implementation("io.quarkus:quarkus-mongodb-rest-data-panache") -// Use this if you are using RESTEasy Reactive -implementation("io.quarkus:quarkus-resteasy-reactive-jackson") +// Use this if you are using Quarkus REST +implementation("io.quarkus:quarkus-rest-jackson") // Use this if you are going to use RESTEasy Classic // implementation("io.quarkus:quarkus-resteasy-jackson") @@ -619,7 +619,7 @@ public interface PeopleResource extends PanacheEntityResource { === Using a runtime property -IMPORTANT: This option is only available when using the RESTEasy Reactive Quarkus extension. +IMPORTANT: This option is only available when using the Quarkus REST Quarkus extension. Quarkus can also conditionally disable the generated Jakarta REST Resources based on the value of runtime properties using the `@io.quarkus.resteasy.reactive.server.EndpointDisabled` annotation. @@ -630,4 +630,4 @@ In the following example, Quarkus will exclude the generated resource from the ` @EndpointDisabled(name = "some.property", stringValue = "disable") public interface PeopleResource extends PanacheEntityResource { } ----- \ No newline at end of file +---- diff --git a/docs/src/main/asciidoc/rest-json.adoc b/docs/src/main/asciidoc/rest-json.adoc index c55c6061eeb42..e584fe9aa84b5 100644 --- a/docs/src/main/asciidoc/rest-json.adoc +++ b/docs/src/main/asciidoc/rest-json.adoc @@ -8,18 +8,18 @@ include::_attributes.adoc[] :categories: web, serialization :summary: JSON is now the lingua franca between microservices. In this guide, we see how you can get your REST services to consume and produce JSON payloads. :topics: rest,json,resteasy-reactive -:extensions: io.quarkus:quarkus-resteasy-reactive-jackson,io.quarkus:quarkus-resteasy-reactive-jsonb,io.quarkus:quarkus-resteasy-reactive +:extensions: io.quarkus:quarkus-rest-jackson,io.quarkus:quarkus-rest-jsonb,io.quarkus:quarkus-rest JSON is now the _lingua franca_ between microservices. In this guide, we see how you can get your REST services to consume and produce JSON payloads. -TIP: there is another guide if you need a xref:rest-client-reactive.adoc[REST client] (including support for JSON). +TIP: there is another guide if you need a xref:rest-client.adoc[REST client] (including support for JSON). [TIP] ==== This is an introduction to writing JSON REST services with Quarkus. -A more detailed guide about RESTEasy Reactive is available xref:resteasy-reactive.adoc[here]. +A more detailed guide about Quarkus REST (formerly RESTEasy Reactive) is available xref:rest.adoc[here]. ==== == Prerequisites @@ -46,10 +46,10 @@ The solution is located in the `rest-json-quickstart` link:{quickstarts-tree-url First, we need a new project. Create a new project with the following command: :create-app-artifact-id: rest-json-quickstart -:create-app-extensions: resteasy-reactive-jackson +:create-app-extensions: rest-jackson include::{includes}/devtools/create-app.adoc[] -This command generates a new project importing the RESTEasy Reactive/Jakarta REST and https://github.com/FasterXML/jackson[Jackson] extensions, +This command generates a new project importing the Quarkus REST/Jakarta REST and https://github.com/FasterXML/jackson[Jackson] extensions, and in particular adds the following dependency: [source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"] @@ -57,14 +57,14 @@ and in particular adds the following dependency: ---- io.quarkus - quarkus-resteasy-reactive-jackson + quarkus-rest-jackson ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-resteasy-reactive-jackson") +implementation("io.quarkus:quarkus-rest-jackson") ---- [NOTE] @@ -72,13 +72,13 @@ implementation("io.quarkus:quarkus-resteasy-reactive-jackson") To improve user experience, Quarkus registers the three Jackson https://github.com/FasterXML/jackson-modules-java8[Java 8 modules] so you don't need to do it manually. ==== -Quarkus also supports https://eclipse-ee4j.github.io/jsonb-api/[JSON-B] so, if you prefer JSON-B over Jackson, you can create a project relying on the RESTEasy Reactive JSON-B extension instead: +Quarkus also supports https://eclipse-ee4j.github.io/jsonb-api/[JSON-B] so, if you prefer JSON-B over Jackson, you can create a project relying on the Quarkus REST JSON-B extension instead: :create-app-artifact-id: rest-json-quickstart -:create-app-extensions: resteasy-reactive-jsonb +:create-app-extensions: rest-jsonb include::{includes}/devtools/create-app.adoc[] -This command generates a new project importing the RESTEasy Reactive/Jakarta REST and https://eclipse-ee4j.github.io/jsonb-api/[JSON-B] extensions, +This command generates a new project importing the Quarkus REST/Jakarta REST and https://eclipse-ee4j.github.io/jsonb-api/[JSON-B] extensions, and in particular adds the following dependency: [source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"] @@ -86,21 +86,21 @@ and in particular adds the following dependency: ---- io.quarkus - quarkus-resteasy-reactive-jsonb + quarkus-rest-jsonb ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-resteasy-reactive-jsonb") +implementation("io.quarkus:quarkus-rest-jsonb") ---- [NOTE] ==== -While named "reactive", RESTEasy Reactive supports equally well both traditional blocking patterns and reactive patterns. +While named "reactive", Quarkus REST supports equally well both traditional blocking patterns and reactive patterns. -For more information about RESTEasy Reactive, please refer to the xref:resteasy-reactive.adoc[dedicated guide]. +For more information about Quarkus REST, please refer to the xref:rest.adoc[dedicated guide]. ==== == Creating your first JSON REST service @@ -181,7 +181,7 @@ depending on the extension you chose when initializing the project. [NOTE] ==== -When a JSON extension is installed such as `quarkus-resteasy-reactive-jackson` or `quarkus-resteasy-reactive-jsonb`, Quarkus will use the `application/json` media type +When a JSON extension is installed such as `quarkus-rest-jackson` or `quarkus-rest-jsonb`, Quarkus will use the `application/json` media type by default for most return values, unless the media type is explicitly set via `@Produces` or `@Consumes` annotations (there are some exceptions for well known types, such as `String` and `File`, which default to `text/plain` and `application/octet-stream` respectively). @@ -508,7 +508,7 @@ This time, you can see our list of legumes. You can return _reactive types_ to handle asynchronous processing. Quarkus recommends the usage of https://smallrye.io/smallrye-mutiny[Mutiny] to write reactive and asynchronous code. -RESTEasy Reactive is naturally integrated with Mutiny. +Quarkus REST is naturally integrated with Mutiny. Your endpoints can return `Uni` or `Multi` instances: diff --git a/docs/src/main/asciidoc/resteasy-reactive-migration.adoc b/docs/src/main/asciidoc/rest-migration.adoc similarity index 60% rename from docs/src/main/asciidoc/resteasy-reactive-migration.adoc rename to docs/src/main/asciidoc/rest-migration.adoc index 09eb2e0a35aa6..e8b8b8680b061 100644 --- a/docs/src/main/asciidoc/resteasy-reactive-migration.adoc +++ b/docs/src/main/asciidoc/rest-migration.adoc @@ -3,56 +3,56 @@ This file is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// -= Migrating to RESTEasy Reactive += Migrating to Quarkus REST (formerly RESTEasy Reactive) include::_attributes.adoc[] :categories: web :topics: rest,rest-client,resteasy-reactive -:extensions: io.quarkus:quarkus-resteasy-reactive,io.quarkus:quarkus-resteasy-reactive-jackson,io.quarkus:quarkus-resteasy-reactive-jsonb,io.quarkus:quarkus-rest-client-reactive,io.quarkus:quarkus-rest-client-reactive-jackson,io.quarkus:quarkus-rest-client-reactive-jsonb +:extensions: io.quarkus:quarkus-rest,io.quarkus:quarkus-rest-jackson,io.quarkus:quarkus-rest-jsonb,io.quarkus:quarkus-rest-client,io.quarkus:quarkus-rest-client-jackson,io.quarkus:quarkus-rest-client-jsonb -Migrating from RESTEasy Classic to RESTEasy Reactive is straightforward in most cases, however there are a few cases that require some attention. +Migrating from RESTEasy Classic to Quarkus REST (formerly RESTEasy Reactive) is straightforward in most cases, however there are a few cases that require some attention. This document provides a list of issues users attempting the migration should be aware of. -NOTE: The reference documentation of RESTEasy Reactive can be found xref:resteasy-reactive.adoc[here]. +NOTE: The reference documentation of Quarkus REST can be found xref:rest.adoc[here]. == Server -The server part of RESTEasy Reactive (`quarkus-resteasy-reactive` and its dependencies) provide an implementation of the Jakarta REST specification, but leverage Quarkus' build time processing +The server part of Quarkus REST (`quarkus-rest` and its dependencies) provide an implementation of the Jakarta REST specification, but leverage Quarkus' build time processing and the unified I/O model provided by Vert.x. === Dependencies -The following table matches the legacy RESTEasy dependencies with the new RESTEasy Reactive ones. +The following table matches the legacy RESTEasy dependencies with the new Quarkus REST ones. |=== -|Legacy |RESTEasy Reactive +|Legacy |Quarkus REST |`quarkus-resteasy` -|`quarkus-resteasy-reactive` +|`quarkus-rest` |`quarkus-resteasy-jackson` -|`quarkus-resteasy-reactive-jackson` +|`quarkus-rest-jackson` |`quarkus-resteasy-jsonb` -|`quarkus-resteasy-reactive-jsonb` +|`quarkus-rest-jsonb` |`quarkus-resteasy-jaxb` -|`quarkus-resteasy-reactive-jaxb` +|`quarkus-rest-jaxb` |`quarkus-resteasy-qute` -|`quarkus-resteasy-reactive-qute` +|`quarkus-rest-qute` |=== -NOTE: The `quarkus-resteasy-mutiny` does not have a corresponding dependency, as RESTEasy Reactive provides Mutiny integration out of the box. +NOTE: The `quarkus-resteasy-mutiny` does not have a corresponding dependency, as Quarkus REST provides Mutiny integration out of the box. === Annotations -RESTEasy Reactive does not support the various custom annotation under the `org.jboss.resteasy.annotations` package. +Quarkus REST does not support the various custom annotation under the `org.jboss.resteasy.annotations` package. -The following table matches the legacy RESTEasy annotations with the new RESTEasy Reactive ones. +The following table matches the legacy RESTEasy annotations with the new Quarkus REST ones. |=== -|Legacy |RESTEasy Reactive |Comments +|Legacy |Quarkus REST |Comments |`org.jboss.resteasy.annotations.jaxrs.PathParam` |`org.jboss.resteasy.reactive.RestPath` @@ -96,31 +96,31 @@ The following table matches the legacy RESTEasy annotations with the new RESTEas |=== -NOTE: The previous table does not include the `org.jboss.resteasy.annotations.Form` annotation because there is no RESTEasy Reactive specific replacement for it. +NOTE: The previous table does not include the `org.jboss.resteasy.annotations.Form` annotation because there is no Quarkus REST specific replacement for it. Users are instead encouraged to use the Jakarta REST standard `jakarta.ws.rs.BeanParam` annotation which is supported on both the server and the client. === Jakarta REST providers -Although RESTEasy Reactive provides the same spec compliant behavior as RESTEasy Classic does, it does not include the same exact provider implementations at runtime. +Although Quarkus REST provides the same spec compliant behavior as RESTEasy Classic does, it does not include the same exact provider implementations at runtime. -The most common case where the difference in providers might result in different behavior, is the included `jakarta.ws.rs.ext.ExceptionMapper` implementations. To see what classes are included in the application, launch the application in dev mode and navigate to http://localhost:8080/q/dev-ui/io.quarkus.quarkus-resteasy-reactive/exception-mappers. +The most common case where the difference in providers might result in different behavior, is the included `jakarta.ws.rs.ext.ExceptionMapper` implementations. To see what classes are included in the application, launch the application in dev mode and navigate to http://localhost:8080/q/dev-ui/io.quarkus.quarkus-rest/exception-mappers. ==== Service Loading RESTEasy Classic supports determining providers at build time using Java's Service Loader. In order to ensure that all providers are determined at build time, -RESTEasy Reactive does not support this feature. Instead, users that have providers in application dependencies are encouraged to index those dependencies +Quarkus REST does not support this feature. Instead, users that have providers in application dependencies are encouraged to index those dependencies using one of the methods described in the xref:cdi-reference.adoc#bean_discovery[Bean Discovery] section of the CDI guide. === Multipart support -HTTP Multipart support in RESTEasy Reactive does **not** reuse the same types or annotations as RESTEasy Classic and thus users are encouraged to read <> part of the reference documentation. +HTTP Multipart support in Quarkus REST does **not** reuse the same types or annotations as RESTEasy Classic and thus users are encouraged to read <> part of the reference documentation. -NOTE: Users migrating multipart resources to RESTEasy Reactive should be aware of the configuration parameter `quarkus.http.limits.max-form-attribute-size`, as this poses an upper limit to the size of each part. +NOTE: Users migrating multipart resources to Quarkus REST should be aware of the configuration parameter `quarkus.http.limits.max-form-attribute-size`, as this poses an upper limit to the size of each part. Any request with a part size exceeding this configuration value will result in HTTP status code 413. === Default media types Quarkus uses smart defaults when determining the media type of Jakarta REST methods in order to simplify common use cases. -The difference between `quarkus-resteasy-reactive` and `quarkus-resteasy` is the use of `text/plain` as the default media type instead of `text/html` +The difference between `quarkus-rest` and `quarkus-resteasy` is the use of `text/plain` as the default media type instead of `text/html` when the method returns a `String`. === Injection of `@SessionScoped` beans @@ -129,10 +129,10 @@ when the method returns a `String`. === Servlets -RESTEasy Reactive does **not** support servlets. +Quarkus REST does **not** support servlets. If your project depends on servlets you have to migrate them. A servlet-based JAX-RS implementation must support injections of these types with the `@Context` annotation: `ServletConfig`, `ServletContext`, `HttpServletRequest` and `HttpServletResponse`. -Since RESTEasy Reactive is not servlet-based these injections will not work. +Since Quarkus REST is not servlet-based these injections will not work. It is not always obvious that this will fail especially if you depend on an extension like `quarkus-undertow` which supplies the interfaces. For example, if you write this you could compile it but get an exception on calling it: @@ -161,33 +161,33 @@ If they happen to depend on servlets you need to find a migration path for them. === Log authentication and authorization failures -The RESTEasy Reactive endpoint security checks are performed before xref:cdi.adoc#interceptors[CDI interceptors] are invoked. +The Quarkus REST endpoint security checks are performed before xref:cdi.adoc#interceptors[CDI interceptors] are invoked. The safest approach to log Quarkus Security authentication exceptions is to ensure that proactive authentication is enabled and to use Vert.x HTTP route failure handlers. For more information, see the xref:security-proactive-authentication.adoc#customize-auth-exception-responses[Customize authentication exception responses] section of the Proactive authentication guide. == Client -The Reactive REST Client (`quarkus-rest-client-reactive` and its dependencies) replaces the legacy `quarkus-resteasy-client` and leverages Quarkus' build time processing +The REST Client (`quarkus-rest-client` and its dependencies) replaces the legacy RESTEasy Classic-based `quarkus-resteasy-client` and leverages Quarkus' build time processing and the unified I/O model provided by Vert.x. === Dependencies -The following table matches the legacy REST Client dependencies with the new Reactive REST Client ones. +The following table matches the legacy RESTEasy Classic-based REST Client dependencies with the new REST Client ones. |=== -|Legacy |RESTEasy Reactive +|Legacy |Quarkus REST |`quarkus-resteasy-client` -|`quarkus-rest-client-reactive` +|`quarkus-rest-client` |`quarkus-resteasy-client-jackson` -|`quarkus-rest-client-reactive-jackson` +|`quarkus-rest-client-jackson` |`quarkus-resteasy-client-jsonb` -|`quarkus-rest-client-reactive-jsonb` +|`quarkus-rest-client-jsonb` |`quarkus-resteasy-client-jaxb` -|`quarkus-rest-client-reactive-jaxb` +|`quarkus-rest-client-jaxb` |`quarkus-resteasy-client-mutiny` |No replacement, natively supports Mutiny @@ -196,21 +196,21 @@ The following table matches the legacy REST Client dependencies with the new Rea === Keycloak admin client -When using `quarkus-resteasy-client`, users can use the `quarkus-keycloak-admin-client` to administer the target Keycloak instance +When using `quarkus-rest-client`, users can use the `quarkus-keycloak-admin-rest-client` to administer the target Keycloak instance by leveraging the rest client. -When using `quarkus-rest-client-reactive` however, users must use `quarkus-keycloak-admin-client-reactive` to access the same functionality -and use the reactive REST Client. +When using `quarkus-resteasy-client` however, users must use `quarkus-keycloak-admin-resteasy-client` to access the same functionality +and use the legacy RESTEasy Classic-based REST Client. === OIDC -When using `quarkus-resteasy-client`, users can use the `quarkus-oidc-client-filter` extensions to acquire and refresh access tokens from OpenID Connect and OAuth 2.0 compliant Authorization Servers. +When using `quarkus-rest-client`, users can use the `quarkus-rest-client-oidc-filter` extension to acquire and refresh access tokens from OpenID Connect and OAuth 2.0 compliant Authorization Servers. -When using `quarkus-rest-client-reactive` however, users must use `quarkus-oidc-client-filter-reactive` to access the same functionality. +When using `quarkus-resteasy-client` however, users must use `quarkus-resteasy-client-oidc-filter` to access the same functionality. -Similarly, `quarkus-oidc-token-propagation` allows user of the legacy REST to propagate the current `Bearer` or `Authorization Code Flow` access tokens. +Similarly, `quarkus-rest-client-oidc-token-propagation` allows user of the legacy REST to propagate the current `Bearer` or `Authorization Code Flow` access tokens. -When using `quarkus-rest-client-reactive` however, users must use `quarkus-oidc-token-propagation-reactive` to access the same functionality. +When using `quarkus-resteasy-client` however, users must use `quarkus-resteasy-client-oidc-token-propagation` to access the same functionality. === Custom extensions @@ -218,11 +218,11 @@ This is an advanced section that only needs to be read by users who have develop ==== Dependencies -A first concern is whether custom extensions should depend on RESTEasy Reactive explicitly, or alternatively support both RESTEasy flavors and leave it to the user to decide. +A first concern is whether custom extensions should depend on Quarkus REST explicitly, or alternatively support both RESTEasy flavors and leave it to the user to decide. If the extension is some general purpose extension, it probably makes sense to choose the latter option, while the former option is easiest to adopt when the custom extension is used by a specific set of users / applications. -When opting for supporting both extensions, the deployment module of the custom extension will usually depend on the SPI modules - `quarkus-jaxrs-spi-deployment`, `quarkus-resteasy-common-spi`, `quarkus-resteasy-reactive-spi-deployment`, +When opting for supporting both extensions, the deployment module of the custom extension will usually depend on the SPI modules - `quarkus-jaxrs-spi-deployment`, `quarkus-resteasy-common-spi`, `quarkus-rest-spi-deployment`, while the runtime modules will have `optional` dependencies on the runtime modules of both RESTEasy flavors. A couple good examples of how Quarkus uses this strategy to support both RESTEasy flavors in the core repository can be seen [here](https://github.com/quarkusio/quarkus/pull/21089) and [here](https://github.com/quarkusio/quarkus/pull/20874). @@ -233,16 +233,16 @@ In general, it should not be needed to have two different versions of the custom Custom extensions that contain Jakarta REST Resources, Providers or REST Client interfaces in their runtime modules and depend on Jandex indexing for their discovery (for example because they have an empty `META-INF/beans.xml` file) don't have to perform any additional setup to make -these discoverable by RESTEasy Reactive. +these discoverable by Quarkus REST. ==== Provider registration via Build Items Extensions that register providers via build items use the `io.quarkus.resteasy.common.spi.ResteasyJaxrsProviderBuildItem` build item in RESTEasy Classic. -With RESTEasy Reactive however, extensions need to use specific build items, such as `io.quarkus.resteasy.reactive.spi.MessageBodyWriterBuildItem` and `io.quarkus.resteasy.reactive.spi.MessageBodyWriterBuildItem`. +With Quarkus REST however, extensions need to use specific build items, such as `io.quarkus.resteasy.reactive.spi.MessageBodyWriterBuildItem` and `io.quarkus.resteasy.reactive.spi.MessageBodyWriterBuildItem`. ==== REST Client -Any code that is run as part of a Quarkus application that used the REST Client, can safely use the Reactive REST Client, as all necessary setup for it has been done at the application's static-init phase. +Any code that is run as part of a Quarkus application that used the RESTEasy Client, can safely use the REST Client, as all necessary setup for it has been done at the application's static-init phase. diff --git a/docs/src/main/asciidoc/resteasy-reactive-virtual-threads.adoc b/docs/src/main/asciidoc/rest-virtual-threads.adoc similarity index 89% rename from docs/src/main/asciidoc/resteasy-reactive-virtual-threads.adoc rename to docs/src/main/asciidoc/rest-virtual-threads.adoc index 80df9473fe074..a220aec16ce0f 100644 --- a/docs/src/main/asciidoc/resteasy-reactive-virtual-threads.adoc +++ b/docs/src/main/asciidoc/rest-virtual-threads.adoc @@ -3,14 +3,14 @@ This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// -[[resteasy-reactive-virtual-threads]] +[[rest-virtual-threads]] = Use virtual threads in REST applications include::_attributes.adoc[] :diataxis-type: howto :categories: web, core :summary: How to use virtual threads in a REST application :topics: rest,resteasy-reactive,virtual-threads -:extensions: io.quarkus:quarkus-resteasy-reactive,io.quarkus:quarkus-resteasy-reactive-jackson,io.quarkus:quarkus-resteasy-reactive-jsonb,io.quarkus:quarkus-rest-client-reactive,io.quarkus:quarkus-rest-client-reactive-jackson,io.quarkus:quarkus-rest-client-reactive-jsonb +:extensions: io.quarkus:quarkus-rest,io.quarkus:quarkus-rest-jackson,io.quarkus:quarkus-rest-jsonb,io.quarkus:quarkus-rest-client,io.quarkus:quarkus-rest-client-jackson,io.quarkus:quarkus-rest-client-jsonb In this guide, we see how you can use virtual threads in a REST application. Because virtual threads are all about I/O, we will also use the REST client. @@ -30,10 +30,10 @@ It calls a weather service for two cities (Valence, France, and Athens, Greece) First, we need a new project. Create a new project with the following command: :create-app-artifact-id: rest-virtual-threads -:create-app-extensions: resteasy-reactive-jackson,quarkus-rest-client-reactive-jackson +:create-app-extensions: rest-jackson,quarkus-rest-client-jackson include::{includes}/devtools/create-app.adoc[] -This command generates a new project importing the RESTEasy Reactive, Reactive REST client, and https://github.com/FasterXML/jackson[Jackson] extensions, +This command generates a new project importing the Quarkus REST (formerly RESTEasy Reactive), REST client, and https://github.com/FasterXML/jackson[Jackson] extensions, and in particular, adds the following dependencies: [source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"] @@ -41,19 +41,19 @@ and in particular, adds the following dependencies: ---- io.quarkus - quarkus-resteasy-reactive-jackson + quarkus-rest-jackson io.quarkus - quarkus-rest-client-reactive-jackson + quarkus-rest-client-jackson ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-resteasy-reactive-jackson") -implementation("quarkus-rest-client-reactive-jackson") +implementation("io.quarkus:quarkus-rest-jackson") +implementation("quarkus-rest-client-jackson") ---- [NOTE] @@ -127,7 +127,7 @@ Note that we strongly recommend Java 21. This section is not about virtual threads. Because we need to do some I/O to demonstrate virtual threads usage, we need a client doing I/O operations. -In addition, the reactive REST client is virtual thread friendly: it does not pin and handle propagation correctly. +In addition, the REST client is virtual thread friendly: it does not pin and handle propagation correctly. Create the `src/main/java/org/acme/WeatherService.java` class with the following content: @@ -160,7 +160,7 @@ public interface WeatherService { ---- This class models the HTTP interaction with the weather service. -Read more about the rest client in the dedicated xref:./rest-client-reactive.adoc[guide]. +Read more about the rest client in the dedicated xref:./rest-client.adoc[guide]. == Create the HTTP endpoint @@ -289,13 +289,13 @@ Run the test with either: - `./mvnw test` As you will see, it does not pin - no stack trace. -It is because the reactive REST client is implemented in a virtual-thread-friendly way. +It is because the REST client is implemented in a virtual-thread-friendly way. The same approach can be used with integration tests. == Conclusion -This guide shows how you can use virtual threads with RESTEasy Reactive and the reactive REST client. +This guide shows how you can use virtual threads with Quarkus REST and the REST client. Learn more about virtual threads support on: - xref:./messaging-virtual-threads.adoc[@RunOnVirtualThread in messaging applications] (this guide covers Apache Kafka) diff --git a/docs/src/main/asciidoc/resteasy-reactive.adoc b/docs/src/main/asciidoc/rest.adoc similarity index 95% rename from docs/src/main/asciidoc/resteasy-reactive.adoc rename to docs/src/main/asciidoc/rest.adoc index 0670c4e9102e6..199f342940b86 100644 --- a/docs/src/main/asciidoc/resteasy-reactive.adoc +++ b/docs/src/main/asciidoc/rest.adoc @@ -3,12 +3,12 @@ This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// -= Writing REST Services with RESTEasy Reactive += Writing REST Services with Quarkus REST (formerly RESTEasy Reactive) include::_attributes.adoc[] :categories: web :topics: rest,resteasy-reactive,virtual-threads -:extensions: io.quarkus:quarkus-resteasy-reactive,io.quarkus:quarkus-resteasy-reactive-jackson,io.quarkus:quarkus-resteasy-reactive-jsonb,io.quarkus:quarkus-rest-client-reactive,io.quarkus:quarkus-rest-client-reactive-jackson,io.quarkus:quarkus-rest-client-reactive-jsonb -:summary: Discover how to develop highly scalable reactive REST services with Jakarta REST and RESTEasy Reactive. +:extensions: io.quarkus:quarkus-rest,io.quarkus:quarkus-rest-jackson,io.quarkus:quarkus-rest-jsonb,io.quarkus:quarkus-rest-client,io.quarkus:quarkus-rest-client-jackson,io.quarkus:quarkus-rest-client-jsonb +:summary: Discover how to develop highly scalable reactive REST services with Jakarta REST and Quarkus REST. :jaxrsapi: https://javadoc.io/doc/jakarta.ws.rs/jakarta.ws.rs-api/3.1.0/jakarta.ws.rs :jaxrsspec: https://jakarta.ee/specifications/restful-ws/3.1/jakarta-restful-ws-spec-3.1.html :jdkapi: https://docs.oracle.com/en/java/javase/17/docs/api/java.base @@ -20,17 +20,17 @@ include::_attributes.adoc[] :resteasy-reactive-api: https://javadoc.io/doc/io.quarkus.resteasy.reactive/resteasy-reactive/{quarkus-version} :resteasy-reactive-common-api: https://javadoc.io/doc/io.quarkus.resteasy.reactive/resteasy-reactive-common/{quarkus-version} -This guide explains how to write REST Services with RESTEasy Reactive in Quarkus. +This guide explains how to write REST Services with Quarkus REST in Quarkus. [TIP] ==== -This is the reference guide for RESTEasy Reactive. +This is the reference guide for Quarkus REST. For a more lightweight introduction, please refer to the xref:rest-json.adoc[Writing JSON REST services guides]. ==== -== What is RESTEasy Reactive? +== What is Quarkus REST? -RESTEasy Reactive is a new link:{jaxrsspec}[Jakarta REST (formerly known as JAX-RS)] +Quarkus REST is a new link:{jaxrsspec}[Jakarta REST (formerly known as JAX-RS)] implementation written from the ground up to work on our common https://vertx.io/[Vert.x] layer and is thus fully reactive, while also being very tightly integrated with Quarkus and consequently moving a lot of work to build time. @@ -50,14 +50,14 @@ Add the following import to your build file: ---- io.quarkus - quarkus-resteasy-reactive + quarkus-rest ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-resteasy-reactive") +implementation("io.quarkus:quarkus-rest") ---- You can now write your first endpoint in the `org.acme.rest.Endpoint` class: @@ -138,7 +138,7 @@ public static class MyApplication extends Application { ---- This will cause all rest endpoints to be resolve relative to `/api`, so the endpoint above with `@Path("rest")` would -be accessible at `/api/rest/`. You can also set the `quarkus.resteasy-reactive.path` build time property to set the root path if you +be accessible at `/api/rest/`. You can also set the `quarkus.rest.path` build time property to set the root path if you don't want to use an annotation. === Declaring endpoints: HTTP methods @@ -331,7 +331,7 @@ See <> for more advanced use-cases. [NOTE] ==== -When an exception occurs in RESTEasy Reactive request parameter handling code, the exception is not printed by default to the log (for security reasons). +When an exception occurs in Quarkus REST request parameter handling code, the exception is not printed by default to the log (for security reasons). This can sometimes make it hard to understand why certain HTTP status codes are returned (as the Jakarta REST mandates the use of non-intuitive error codes in various cases). In such cases, users are encouraged to set the logging level for the `org.jboss.resteasy.reactive.server.handlers.ParameterHandler` category to `DEBUG` like so: @@ -595,13 +595,13 @@ public static class Resource { ==== Handling malformed input -As part of reading the multipart body, RESTEasy Reactive invokes the proper MessageBodyReaderlink:{jaxrsapi}/jakarta/ws/rs/ext/MessageBodyReader.html[`MessageBodyReader`] for each part of the request. +As part of reading the multipart body, Quarkus REST invokes the proper MessageBodyReaderlink:{jaxrsapi}/jakarta/ws/rs/ext/MessageBodyReader.html[`MessageBodyReader`] for each part of the request. If an `IOException` occurs for one of these parts (for example if Jackson was unable to deserialize a JSON part), then a `org.jboss.resteasy.reactive.server.multipart.MultipartPartReadingException` is thrown. If this exception is not handled by the application as mentioned in <>, an HTTP 400 response is returned by default. ==== Multipart output -Similarly, RESTEasy Reactive can produce Multipart Form data to allow users download files from the server. For example, we could write a POJO +Similarly, Quarkus REST can produce Multipart Form data to allow users download files from the server. For example, we could write a POJO that will hold the information we want to expose as: [source,java] @@ -853,7 +853,7 @@ public class FruitResource { ==== Using RedirectException -Users can also throw `jakarta.ws.rs.RedirectionException` from a method body to get RESTEasy Reactive to perform the desired redirect. +Users can also throw `jakarta.ws.rs.RedirectionException` from a method body to get Quarkus REST to perform the desired redirect. === Async/reactive support @@ -1219,7 +1219,7 @@ Manipulation of the returned HTTP headers and status code is not possible via `R === Controlling HTTP Caching features -RESTEasy Reactive provides the link:{resteasy-reactive-common-api}/org/jboss/resteasy/reactive/Cache.html[`@Cache`] +Quarkus REST provides the link:{resteasy-reactive-common-api}/org/jboss/resteasy/reactive/Cache.html[`@Cache`] and link:{resteasy-reactive-common-api}/org/jboss/resteasy/reactive/NoCache.html[`@NoCache`] annotations to facilitate handling HTTP caching semantics, i.e. setting the 'Cache-Control' HTTP header. @@ -1274,7 +1274,7 @@ method takes parameters of the following type: |Advanced: access to instances of endpoints |link:{resteasy-reactive-api}/org/jboss/resteasy/reactive/server/spi/ServerRequestContext.html[`ServerRequestContext`] -|Advanced: RESTEasy Reactive access to the current request/response +|Advanced: Quarkus REST access to the current request/response |link:{jaxrsapi}/jakarta/ws/rs/sse/Sse.html[`Sse`] |Advanced: Complex SSE use-cases @@ -1374,15 +1374,15 @@ public class Endpoint { [[json]] -Instead of importing `io.quarkus:quarkus-resteasy-reactive`, you can import either of the following modules to get support for JSON: +Instead of importing `io.quarkus:quarkus-rest`, you can import either of the following modules to get support for JSON: |=== |GAV|Usage -|`io.quarkus:quarkus-resteasy-reactive-jackson` +|`io.quarkus:quarkus-rest-jackson` |https://github.com/FasterXML/jackson[Jackson support] -|`io.quarkus:quarkus-resteasy-reactive-jsonb` +|`io.quarkus:quarkus-rest-jsonb` |https://eclipse-ee4j.github.io/jsonb-api/[JSON-B support] |=== @@ -1393,12 +1393,12 @@ serialisation>>. ==== Advanced Jackson-specific features -When using the `quarkus-resteasy-reactive-jackson` extension there are some advanced features that RESTEasy Reactive supports. +When using the `quarkus-rest-jackson` extension there are some advanced features that Quarkus REST supports. [[secure-serialization]] ===== Secure serialization -When used with Jackson to perform JSON serialization, RESTEasy Reactive provides the ability to limit the set of fields that are serialized based on the roles of the current user. +When used with Jackson to perform JSON serialization, Quarkus REST provides the ability to limit the set of fields that are serialized based on the roles of the current user. This is achieved by simply annotating the fields (or getters) of the POJO being returned with `@io.quarkus.resteasy.reactive.jackson.SecureField`. A simple example could be the following: @@ -1537,7 +1537,7 @@ public class User { Depending on the Jakarta REST method that returns this user, we might want to exclude the `id` field from serialization. For example, you might want an insecure method to not expose this field. -The way we can achieve that in RESTEasy Reactive is shown in the following example: +The way we can achieve that in Quarkus REST is shown in the following example: [source,java] ---- @@ -1621,12 +1621,12 @@ public static class SupportUnquotedFields implements BiFunction>. -The JAXB Resteasy Reactive extension will automatically detect the classes that are used in the resources and require JAXB serialization. Then, it will register these classes into the default `JAXBContext` which is internally used by the JAXB message reader and writer. +The JAXB Quarkus REST extension will automatically detect the classes that are used in the resources and require JAXB serialization. Then, it will register these classes into the default `JAXBContext` which is internally used by the JAXB message reader and writer. -However, in some situations, these classes cause the `JAXBContext` to fail: for example, when you're using the same class name in different java packages. In these cases, the application will fail at build time and print the JAXB exception that caused the issue, so you can properly fix it. Alternatively, you can also exclude the classes that cause the issue by using the property `quarkus.jaxb.exclude-classes`. When excluding classes that are required by any resource, the JAXB resteasy reactive extension will create and cache a custom `JAXBContext` that will include the excluded class, causing a minimal performance degradance. +However, in some situations, these classes cause the `JAXBContext` to fail: for example, when you're using the same class name in different java packages. In these cases, the application will fail at build time and print the JAXB exception that caused the issue, so you can properly fix it. Alternatively, you can also exclude the classes that cause the issue by using the property `quarkus.jaxb.exclude-classes`. When excluding classes that are required by any resource, the JAXB Quarkus REST extension will create and cache a custom `JAXBContext` that will include the excluded class, causing a minimal performance degradance. [NOTE] ==== @@ -1653,11 +1653,11 @@ For instance, when setting `quarkus.jaxb.exclude-classes=org.acme.one.Model,org. ==== Advanced JAXB-specific features -When using the `quarkus-resteasy-reactive-jaxb` extension there are some advanced features that RESTEasy Reactive supports. +When using the `quarkus-resteasy-reactive-jaxb` extension there are some advanced features that Quarkus REST supports. ===== Inject JAXB components -The JAXB resteasy reactive extension will serialize and unserialize requests and responses transparently for users. However, if you need finer grain control over JAXB components, you can inject either the JAXBContext, Marshaller, or Unmarshaller components into your beans: +The JAXB Quarkus REST extension will serialize and unserialize requests and responses transparently for users. However, if you need finer grain control over JAXB components, you can inject either the JAXBContext, Marshaller, or Unmarshaller components into your beans: [source,java] ---- @@ -1742,12 +1742,12 @@ Note that if you provide your custom JAXB context instance, you will need to reg [[links]] -To enable Web Links support, add the `quarkus-resteasy-reactive-links` extension to your project. +To enable Web Links support, add the `quarkus-rest-links` extension to your project. |=== |GAV|Usage -|`io.quarkus:quarkus-resteasy-reactive-links` +|`io.quarkus:quarkus-rest-links` |https://www.w3.org/wiki/LinkHeader[Web Links support] |=== @@ -1885,7 +1885,7 @@ Using this injected bean of type `RestLinksProvider`, you can get the links by t The https://tools.ietf.org/id/draft-kelly-json-hal-01.html[HAL] standard is a simple format to represent web links. -To enable the HAL support, add the `quarkus-hal` extension to your project. Also, as HAL needs JSON support, you need to add either the `quarkus-resteasy-reactive-jsonb` or the `quarkus-resteasy-reactive-jackson` extension. +To enable the HAL support, add the `quarkus-hal` extension to your project. Also, as HAL needs JSON support, you need to add either the `quarkus-rest-jsonb` or the `quarkus-rest-jackson` extension. |=== |GAV|Usage @@ -2040,7 +2040,7 @@ could prove useful for more complex use cases. [[execution-model]] -RESTEasy Reactive is implemented using two main thread types: +Quarkus REST is implemented using two main thread types: - Event-loop threads: which are responsible, among other things, for reading bytes from the HTTP request and writing bytes back to the HTTP response @@ -2050,7 +2050,7 @@ The event-loop threads (also called IO threads) are responsible for actually per operations in an asynchronous way, and to trigger any listener interested in the completion of those IO operations. -By default, the thread RESTEasy Reactive will run endpoint methods on depends on the signature of the method. +By default, the thread Quarkus REST will run endpoint methods on depends on the signature of the method. If a method returns one of the following types then it is considered non-blocking, and will be run on the IO thread by default: @@ -2296,9 +2296,9 @@ It may declare any of the following return types: [NOTE] ==== -When an exception occurs, RESTEasy Reactive does not log it by default (for security reasons). +When an exception occurs, Quarkus REST does not log it by default (for security reasons). This can sometimes make it hard to understand why certain exception handling code was invoked (or not invoked). -To make RESTEasy Reactive log the actual exception before an exception mapping code is run the `org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext` log category can be set to `DEBUG` like so: +To make Quarkus REST log the actual exception before an exception mapping code is run the `org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext` log category can be set to `DEBUG` like so: [source, properties] ---- @@ -2491,7 +2491,7 @@ A `ContainerResponseFilter` will also be called for <`] or link:{jaxrsapi}/jakarta/ws/rs/core/Response.html[`Response`] with -an entity), RESTEasy Reactive will look for a way to map that into an HTTP response body. +an entity), Quarkus REST will look for a way to map that into an HTTP response body. Similarly, whenever your endpoint method takes an object as parameter, we will look for a way to map the HTTP request body into that object. @@ -2715,9 +2715,9 @@ public class CheeseIOInterceptor implements ReaderInterceptor, WriterInterceptor } ---- -==== RESTEasy Reactive and REST Client Reactive interactions +==== Quarkus REST and REST Client interactions -In Quarkus, the RESTEasy Reactive extension and xref:rest-client-reactive.adoc[the REST Client Reactive extension] share the same infrastructure. +In Quarkus, the Quarkus REST extension and xref:rest-client.adoc[the REST Client extension] share the same infrastructure. One important consequence of this consideration is that they share the same list of providers (in the Jakarta REST meaning of the word). For instance, if you declare a `WriterInterceptor`, it will by default intercept both the servers calls and the client calls, @@ -2834,7 +2834,7 @@ public class Endpoint { ==== Handling dates -RESTEasy Reactive supports the use of the implementations of `java.time.Temporal` (like `java.time.LocalDateTime`) as query, path, or form params. +Quarkus REST supports the use of the implementations of `java.time.Temporal` (like `java.time.LocalDateTime`) as query, path, or form params. Furthermore, it provides the `@org.jboss.resteasy.reactive.DateFormat` annotation, which can be used to set a custom expected pattern. Otherwise, the JDK's default format for each type is used implicitly. @@ -3156,10 +3156,10 @@ This feature does not work when using native build. ==== -== RESTEasy Reactive client +== REST Client -In addition to the Server side, RESTEasy Reactive comes with a new MicroProfile REST Client implementation that is non-blocking at its core. +In addition to the Server side, Quarkus REST comes with a new MicroProfile REST Client implementation that is non-blocking at its core. -Please note that the `quarkus-rest-client` extension may not be used with RESTEasy Reactive, use `quarkus-rest-client-reactive` instead. +Please note that the `quarkus-resteasy-client` extension may not be used with Quarkus REST, use `quarkus-rest-client` instead. -See the xref:rest-client-reactive.adoc[REST Client Reactive Guide] for more information about the reactive REST client. +See the xref:rest-client.adoc[REST Client Guide] for more information about the REST client. diff --git a/docs/src/main/asciidoc/resteasy-client-multipart.adoc b/docs/src/main/asciidoc/resteasy-client-multipart.adoc index ff1987d097dfb..2ef9fe2cec01f 100644 --- a/docs/src/main/asciidoc/resteasy-client-multipart.adoc +++ b/docs/src/main/asciidoc/resteasy-client-multipart.adoc @@ -14,9 +14,9 @@ include::_attributes.adoc[] ==== This guide is about the multipart support of the REST Client compatible with https://resteasy.dev[RESTEasy Classic] which used to be the default Jakarta REST (formerly known as JAX-RS) implementation until Quarkus 2.8. -It is now recommended to use RESTEasy Reactive, which supports equally well traditional blocking workloads and reactive workloads. -For more information about RESTEasy Reactive, -please see the xref:rest-client-reactive.adoc[REST Client Reactive guide] and, for the server side, the xref:rest-json.adoc[introductory REST JSON guide] or the more detailed xref:resteasy-reactive.adoc[RESTEasy Reactive guide]. +It is now recommended to use Quarkus REST (formerly RESTEasy Reactive), which supports equally well traditional blocking workloads and reactive workloads. +For more information about Quarkus REST, +please see the xref:rest-client.adoc[REST Client guide] and, for the server side, the xref:rest-json.adoc[introductory REST JSON guide] or the more detailed xref:rest.adoc[Quarkus REST guide]. ==== RESTEasy has rich support for the `multipart/*` and `multipart/form-data` mime types. The multipart mime format is used to pass lists of content bodies. Multiple content bodies are embedded in one message. `multipart/form-data` is often found in web application HTML Form documents and is generally used to upload files. The form-data format is the same as other multipart formats, except that each inlined piece of content has a name associated with it. diff --git a/docs/src/main/asciidoc/resteasy-client.adoc b/docs/src/main/asciidoc/resteasy-client.adoc index 912a70ea3b7f7..f04039cf50afb 100644 --- a/docs/src/main/asciidoc/resteasy-client.adoc +++ b/docs/src/main/asciidoc/resteasy-client.adoc @@ -14,9 +14,9 @@ include::_attributes.adoc[] ==== This guide is about the REST Client compatible with https://resteasy.dev[RESTEasy Classic] which used to be the default Jakarta REST (formerly known as JAX-RS) implementation until Quarkus 2.8. -It is now recommended to use RESTEasy Reactive, which supports equally well traditional blocking workloads and reactive workloads. -For more information about RESTEasy Reactive, -please see the xref:rest-client-reactive.adoc[REST Client Reactive guide] and, for the server side, the xref:rest-json.adoc[introductory REST JSON guide] or the more detailed xref:resteasy-reactive.adoc[RESTEasy Reactive guide]. +It is now recommended to use Quarkus REST (formerly RESTEasy Reactive), which supports equally well traditional blocking workloads and reactive workloads. +For more information about Quarkus REST, +please see the xref:rest-client.adoc[REST Client guide] and, for the server side, the xref:rest-json.adoc[introductory REST JSON guide] or the more detailed xref:rest.adoc[Quarkus REST guide]. ==== This guide explains how to use the RESTEasy REST Client in order to interact with REST APIs @@ -664,7 +664,7 @@ In some cases you may want to mock the remote endpoint - the HTTP server - inste This may be especially useful for native tests, or for programmatically created clients. You can easily mock an HTTP Server with Wiremock. -The xref:rest-client-reactive.adoc#using-a-mock-http-server-for-tests[Wiremock section of the Quarkus - Using the REST Client] +The xref:rest-client.adoc#using-a-mock-http-server-for-tests[Wiremock section of the Quarkus - Using the REST Client] describes how to set it up in detail. == Further reading diff --git a/docs/src/main/asciidoc/resteasy.adoc b/docs/src/main/asciidoc/resteasy.adoc index b4db9a5ca12ea..7c8c4f710ef75 100644 --- a/docs/src/main/asciidoc/resteasy.adoc +++ b/docs/src/main/asciidoc/resteasy.adoc @@ -13,10 +13,10 @@ include::_attributes.adoc[] ==== This guide is about https://resteasy.dev[RESTEasy Classic], which used to be the default Jakarta REST (formerly known as JAX-RS) implementation until Quarkus 2.8. -It is now recommended to use RESTEasy Reactive, which supports both traditional blocking workloads and reactive workloads equally well. +It is now recommended to use Quarkus REST (formerly RESTEasy Reactive), which supports both traditional blocking workloads and reactive workloads equally well. -For more information about RESTEasy Reactive, -please see the xref:rest-json.adoc[introductory REST JSON guide] or the xref:resteasy-reactive.adoc[RESTEasy Reactive reference documentation]. +For more information about Quarkus REST, +please see the xref:rest-json.adoc[introductory REST JSON guide] or the xref:rest.adoc[Quarkus REST reference documentation]. ==== TIP: There is another guide if you need a xref:resteasy-client.adoc[REST client based on RESTEasy Classic] (including support for JSON). @@ -598,7 +598,7 @@ This time, you can see our list of legumes. [WARNING] ==== -For reactive workloads, please always use xref:resteasy-reactive.adoc[RESTEasy Reactive]. +For reactive workloads, please always use xref:rest.adoc[Quarkus REST]. ==== You can return _reactive types_ to handle asynchronous processing. diff --git a/docs/src/main/asciidoc/scheduler.adoc b/docs/src/main/asciidoc/scheduler.adoc index 6fdd25396e772..0938fd2a59351 100644 --- a/docs/src/main/asciidoc/scheduler.adoc +++ b/docs/src/main/asciidoc/scheduler.adoc @@ -40,7 +40,7 @@ The solution is located in the `scheduler-quickstart` link:{quickstarts-tree-url First, we need a new project. Create a new project with the following command: :create-app-artifact-id: scheduler-quickstart -:create-app-extensions: resteasy-reactive,scheduler +:create-app-extensions: rest,scheduler include::{includes}/devtools/create-app.adoc[] It generates a new project including: @@ -49,7 +49,7 @@ It generates a new project including: * example `Dockerfile` files for both `native` and `jvm` modes * the application configuration file -The project also imports the RESTEasy Reactive and scheduler extensions. +The project also imports the Quarkus REST (formerly RESTEasy Reactive) and scheduler extensions. If you already have your Quarkus project configured, you can add the `scheduler` extension to your project by running the following command in your project base directory: diff --git a/docs/src/main/asciidoc/scripting.adoc b/docs/src/main/asciidoc/scripting.adoc index 4b7fa39202b3e..a57f94b7702f4 100644 --- a/docs/src/main/asciidoc/scripting.adoc +++ b/docs/src/main/asciidoc/scripting.adoc @@ -32,7 +32,7 @@ Normally we would link to a Git repository to clone but in this case there is no ---- //usr/bin/env jbang "$0" "$@" ; exit $? //DEPS {quarkus-platform-groupid}:quarkus-bom:{quarkus-version}@pom -//DEPS io.quarkus:quarkus-resteasy-reactive +//DEPS io.quarkus:quarkus-rest //JAVAC_OPTIONS -parameters //JAVA_OPTIONS -Djava.util.logging.manager=org.jboss.logmanager.LogManager @@ -117,12 +117,12 @@ The next lines illustrate how you add dependencies to this script. This is a feature of JBang. -Go ahead and update this line to include the `quarkus-bom` and the `quarkus-resteasy-reactive` dependency like so: +Go ahead and update this line to include the `quarkus-bom` and the `quarkus-rest` dependency like so: [source,java,subs=attributes+] ---- //DEPS {quarkus-platform-groupid}:quarkus-bom:{quarkus-version}@pom -//DEPS io.quarkus:quarkus-resteasy-reactive +//DEPS io.quarkus:quarkus-rest ---- Now, run `jbang quarkusapp.java` and you will see JBang resolving this dependency and building the jar with help from Quarkus' JBang integration. @@ -210,7 +210,7 @@ __ ____ __ _____ ___ __ ____ ______ --\___\_\____/_/ |_/_/|_/_/|_|\____/___/ 2023-03-22 09:48:39,891 INFO [io.quarkus] (main) quarkus 999-SNAPSHOT on JVM (powered by Quarkus {quarkus-version}) started in 0.283s. Listening on: http://0.0.0.0:8080 2023-03-22 09:48:39,904 INFO [io.quarkus] (main) Profile prod activated. -2023-03-22 09:48:39,904 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, smallrye-context-propagation, vertx] +2023-03-22 09:48:39,904 INFO [io.quarkus] (main) Installed features: [cdi, rest, smallrye-context-propagation, vertx] ---- Once started, you can request the provided endpoint: @@ -230,9 +230,9 @@ We are using `curl -w "\n"` in this example to avoid your terminal printing a '% ==== [TIP] -.Why is `quarkus-resteasy-reactive` not resolved? +.Why is `quarkus-rest` not resolved? ==== -In this second run you should not see a line saying it is resolving `quarkus-resteasy-reactive` as JBang caches the dependency resolution between runs. +In this second run you should not see a line saying it is resolving `quarkus-rest` as JBang caches the dependency resolution between runs. If you want to clear the caches to force resolution use `jbang cache clear`. ==== @@ -241,7 +241,7 @@ If you want to clear the caches to force resolution use `jbang cache clear`. Dependency injection in Quarkus is based on ArC which is a CDI-based dependency injection solution tailored for Quarkus' architecture. You can learn more about it in the xref:cdi-reference.adoc[Contexts and Dependency Injection guide]. -ArC comes as a dependency of `quarkus-resteasy-reactive` so you already have it handy. +ArC comes as a dependency of `quarkus-rest` so you already have it handy. Let's modify the application and add a companion bean. @@ -278,7 +278,7 @@ Edit the `quarksapp` class to inject the `GreetingService` and create a new endp ---- //usr/bin/env jbang "$0" "$@" ; exit $? //DEPS io.quarkus.platform:quarkus-bom:{quarkus-version}@pom -//DEPS io.quarkus:quarkus-resteasy-reactive +//DEPS io.quarkus:quarkus-rest import io.quarkus.runtime.Quarkus; import jakarta.enterprise.context.ApplicationScoped; @@ -331,7 +331,7 @@ hello null Now that is unexpected, why is it returning `hello null` and not `hello quarkus`? -The reason is that RESTEasy Reactive relies on the `-parameters` compiler flag to be set to be able to map `{name}` to the `name` parameter. +The reason is that Quarkus REST (formerly RESTEasy Reactive) relies on the `-parameters` compiler flag to be set to be able to map `{name}` to the `name` parameter. We fix that by adding the following comment instruction to the file: @@ -423,7 +423,7 @@ __ ____ __ _____ ___ __ ____ ______ --\___\_\____/_/ |_/_/|_/_/|_|\____/___/ 2023-03-22 09:37:57,471 INFO [io.quarkus] (main) quarkus 999-SNAPSHOT native (powered by {quarkus-version}) started in 0.009s. Listening on: http://0.0.0.0:8080 2023-03-22 09:37:57,472 INFO [io.quarkus] (main) Profile prod activated. -2023-03-22 09:37:57,472 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, smallrye-context-propagation, vertx] +2023-03-22 09:37:57,472 INFO [io.quarkus] (main) Installed features: [cdi, rest, smallrye-context-propagation, vertx] ---- This native build will take some time on first run but any subsequent runs (without changing `quarkusapp.java`) will be close to instant thanks to JBang cache: @@ -437,7 +437,7 @@ __ ____ __ _____ ___ __ ____ ______ --\___\_\____/_/ |_/_/|_/_/|_|\____/___/ 2023-03-22 09:38:45,450 INFO [io.quarkus] (main) quarkus 999-SNAPSHOT native (powered by {quarkus-version}) started in 0.009s. Listening on: http://0.0.0.0:8080 2023-03-22 09:38:45,450 INFO [io.quarkus] (main) Profile prod activated. -2023-03-22 09:38:45,450 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, smallrye-context-propagation, vertx] +2023-03-22 09:38:45,450 INFO [io.quarkus] (main) Installed features: [cdi, rest, smallrye-context-propagation, vertx] ---- === Conclusion diff --git a/docs/src/main/asciidoc/security-authentication-mechanisms.adoc b/docs/src/main/asciidoc/security-authentication-mechanisms.adoc index af7e03bcbdda8..9584b86abb792 100644 --- a/docs/src/main/asciidoc/security-authentication-mechanisms.adoc +++ b/docs/src/main/asciidoc/security-authentication-mechanisms.adoc @@ -344,7 +344,7 @@ The `quarkus-oidc-client` extension provides `OidcClient` for acquiring and refr * `password` * `refresh_token` -The `quarkus-oidc-client-filter` extension requires the `quarkus-oidc-client` extension. +The `quarkus-resteasy-client-oidc-filter` extension requires the `quarkus-oidc-client` extension. It provides JAX-RS RESTful Web Services `OidcClientRequestFilter`, which sets the access token acquired by `OidcClient` as the `Bearer` scheme value of the HTTP `Authorization` header. This filter can be registered with MicroProfile REST client implementations injected into the current Quarkus endpoint, but it is not related to the authentication requirements of this service endpoint. For example, it can be a public endpoint or be protected with mTLS. @@ -354,7 +354,7 @@ For example, it can be a public endpoint or be protected with mTLS. In this scenario, you do not need to protect your Quarkus endpoint by using the Quarkus OpenID Connect adapter. ==== -The `quarkus-oidc-token-propagation` extension requires the `quarkus-oidc` extension. +The `quarkus-resteasy-client-oidc-token-propagation` extension requires the `quarkus-oidc` extension. It provides Jakarta REST `TokenCredentialRequestFilter`, which sets the OpenID Connect Bearer token or Authorization Code Flow access token as the `Bearer` scheme value of the HTTP `Authorization` header. This filter can be registered with MicroProfile REST client implementations injected into the current Quarkus endpoint, which must be protected by using the Quarkus OIDC adapter. This filter can propagate the access token to the downstream services. diff --git a/docs/src/main/asciidoc/security-authorize-web-endpoints-reference.adoc b/docs/src/main/asciidoc/security-authorize-web-endpoints-reference.adoc index 723d3aaf27907..5c7fd935985ce 100644 --- a/docs/src/main/asciidoc/security-authorize-web-endpoints-reference.adoc +++ b/docs/src/main/asciidoc/security-authorize-web-endpoints-reference.adoc @@ -8,7 +8,7 @@ include::_attributes.adoc[] :diataxis-type: reference :categories: security,web :topics: security,authorization,http,rest -:extensions: io.quarkus:quarkus-vertx-http,io.quarkus:quarkus-resteasy-reactive,io.quarkus:quarkus-resteasy +:extensions: io.quarkus:quarkus-vertx-http,io.quarkus:quarkus-rest,io.quarkus:quarkus-resteasy Quarkus incorporates a pluggable web security layer. When security is active, the system performs a permission check on all HTTP requests to determine if they should proceed. diff --git a/docs/src/main/asciidoc/security-csrf-prevention.adoc b/docs/src/main/asciidoc/security-csrf-prevention.adoc index b56e7d49ad941..45d3b372be5a2 100644 --- a/docs/src/main/asciidoc/security-csrf-prevention.adoc +++ b/docs/src/main/asciidoc/security-csrf-prevention.adoc @@ -16,7 +16,7 @@ Quarkus Security provides a CSRF prevention feature which implements https://che `Double Submit Cookie` technique requires that the CSRF token sent as `HTTPOnly`, optionally signed, cookie to the client, and directly embedded in a hidden form input of server-side rendered HTML forms, or submitted as a request header value. -The extension consists of a xref:resteasy-reactive.adoc[RESTEasy Reactive] server filter which creates and verifies CSRF tokens in `application/x-www-form-urlencoded` and `multipart/form-data` forms and a Qute HTML form parameter provider which supports the xref:qute-reference.adoc#injecting-beans-directly-in-templates[injection of CSRF tokens in Qute templates]. +The extension consists of a xref:rest.adoc[Quarkus REST (formerly RESTEasy Reactive)] server filter which creates and verifies CSRF tokens in `application/x-www-form-urlencoded` and `multipart/form-data` forms and a Qute HTML form parameter provider which supports the xref:qute-reference.adoc#injecting-beans-directly-in-templates[injection of CSRF tokens in Qute templates]. == Creating the Project @@ -327,7 +327,7 @@ include::{generated-dir}/config/quarkus-csrf-reactive.adoc[leveloffset=+1, opts= == References * https://owasp.org/www-community/attacks/csrf[OWASP Cross-Site Request Forgery] -* xref:resteasy-reactive.adoc[RESTEasy Reactive] +* xref:rest.adoc[Quarkus REST] * xref:qute-reference.adoc[Qute Reference] * xref:security-cors.adoc#cors-filter[Cross-origin resource sharing] * xref:security-overview.adoc[Quarkus Security overview] diff --git a/docs/src/main/asciidoc/security-getting-started-tutorial.adoc b/docs/src/main/asciidoc/security-getting-started-tutorial.adoc index a4676ab997cc7..29311a068cf7d 100644 --- a/docs/src/main/asciidoc/security-getting-started-tutorial.adoc +++ b/docs/src/main/asciidoc/security-getting-started-tutorial.adoc @@ -75,7 +75,7 @@ You can use either Hibernate ORM or Hibernate Reactive. ** To create the Maven project with Hibernate ORM, use the following command: :create-app-artifact-id: security-jpa-quickstart -:create-app-extensions: security-jpa,jdbc-postgresql,resteasy-reactive,hibernate-orm-panache +:create-app-extensions: security-jpa,jdbc-postgresql,rest,hibernate-orm-panache include::{includes}/devtools/create-app.adoc[] * To add the Jakarta Persistence extension to an existing Maven project, complete one of the following steps: diff --git a/docs/src/main/asciidoc/security-jdbc.adoc b/docs/src/main/asciidoc/security-jdbc.adoc index a8718e70ebd10..7a3e8a906f15d 100644 --- a/docs/src/main/asciidoc/security-jdbc.adoc +++ b/docs/src/main/asciidoc/security-jdbc.adoc @@ -43,7 +43,7 @@ The solution is located in the `security-jdbc-quickstart` link:{quickstarts-tree First, we need a new project. Create a new project with the following command: :create-app-artifact-id: security-jdbc-quickstart -:create-app-extensions: elytron-security-jdbc,jdbc-postgresql,resteasy-reactive +:create-app-extensions: elytron-security-jdbc,jdbc-postgresql,rest include::{includes}/devtools/create-app.adoc[] [NOTE] diff --git a/docs/src/main/asciidoc/security-jwt.adoc b/docs/src/main/asciidoc/security-jwt.adoc index 586feadd7d8d3..fb2564faf1082 100644 --- a/docs/src/main/asciidoc/security-jwt.adoc +++ b/docs/src/main/asciidoc/security-jwt.adoc @@ -42,7 +42,7 @@ The solution is located in the `security-jwt-quickstart` link:{quickstarts-tree- First, create a new project with the following command: :create-app-artifact-id: security-jwt-quickstart -:create-app-extensions: resteasy-reactive-jackson,smallrye-jwt,smallrye-jwt-build +:create-app-extensions: rest-jackson,smallrye-jwt,smallrye-jwt-build include::{includes}/devtools/create-app.adoc[] This command generates the Maven project and imports the `smallrye-jwt` extension, which includes the {mp-jwt} support. @@ -163,7 +163,7 @@ and you should see output similar to: Listening for transport dt_socket at address: 5005 2020-07-15 16:09:50,883 INFO [io.quarkus] (Quarkus Main Thread) security-jwt-quickstart 1.0.0-SNAPSHOT on JVM (powered by Quarkus 999-SNAPSHOT) started in 1.073s. Listening on: http://0.0.0.0:8080 2020-07-15 16:09:50,885 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. -2020-07-15 16:09:50,885 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, mutiny, resteasy-reactive, resteasy-reactive-jackson, security, smallrye-context-propagation, smallrye-jwt, vertx, vertx-web] +2020-07-15 16:09:50,885 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, mutiny, rest, rest-jackson, security, smallrye-context-propagation, smallrye-jwt, vertx, vertx-web] ---- Now that the REST endpoint is running, we can access it using a command line tool like curl: @@ -584,7 +584,7 @@ And executed using `java -jar target/quarkus-app/quarkus-run.jar`: ---- $ java -jar target/quarkus-app/quarkus-run.jar 2019-03-28 14:27:48,839 INFO [io.quarkus] (main) Quarkus {quarkus-version} started in 0.796s. Listening on: http://[::]:8080 -2019-03-28 14:27:48,841 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, resteasy-reactive-jackson, security, smallrye-jwt] +2019-03-28 14:27:48,841 INFO [io.quarkus] (main) Installed features: [cdi, rest, rest-jackson, security, smallrye-jwt] ---- You can also generate the native executable with: @@ -613,7 +613,7 @@ include::{includes}/devtools/build-native.adoc[] $ ./target/security-jwt-quickstart-runner 2019-03-28 14:31:37,315 INFO [io.quarkus] (main) Quarkus 0.12.0 started in 0.006s. Listening on: http://[::]:8080 -2019-03-28 14:31:37,316 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, resteasy-reactive-jackson, security, smallrye-jwt] +2019-03-28 14:31:37,316 INFO [io.quarkus] (main) Installed features: [cdi, rest, rest-jackson, security, smallrye-jwt] ---- === Explore the Solution diff --git a/docs/src/main/asciidoc/security-keycloak-admin-client.adoc b/docs/src/main/asciidoc/security-keycloak-admin-client.adoc index a62d239d0a28c..b4d70655ef1b4 100644 --- a/docs/src/main/asciidoc/security-keycloak-admin-client.adoc +++ b/docs/src/main/asciidoc/security-keycloak-admin-client.adoc @@ -8,7 +8,7 @@ include::_attributes.adoc[] :categories: security :keywords: sso oidc security keycloak :topics: security,authentication,authorization,keycloak,sso -:extensions: io.quarkus:quarkus-keycloak-admin-client-reactive,io.quarkus:quarkus-keycloak-admin-client +:extensions: io.quarkus:quarkus-keycloak-admin-rest-client,io.quarkus:quarkus-keycloak-admin-resteasy-client The Quarkus Keycloak Admin Client and its reactive twin support Keycloak Admin Client which can be used to configure a running Keycloak server. @@ -28,15 +28,15 @@ First, we need a new project. Create a new project with the following command: :create-app-artifact-id: security-keycloak-admin-client -:create-app-extensions: keycloak-admin-client-reactive,resteasy-reactive-jackson +:create-app-extensions: keycloak-admin-rest-client,rest-jackson include::{includes}/devtools/create-app.adoc[] -This command generates a project which imports the `keycloak-admin-client-reactive` and `resteasy-reactive-jackson` extensions. +This command generates a project which imports the `keycloak-admin-rest-client` and `rest-jackson` extensions. -If you already have your Quarkus project configured, you can add the `keycloak-admin-client-reactive` and `resteasy-reactive-jackson` extensions +If you already have your Quarkus project configured, you can add the `keycloak-admin-rest-client` and `rest-jackson` extensions to your project by running the following command in your project base directory: -:add-extension-extensions: keycloak-admin-client-reactive,resteasy-reactive-jackson +:add-extension-extensions: keycloak-admin-rest-client,rest-jackson include::{includes}/devtools/extension-add.adoc[] This will add the following to your build file: @@ -46,19 +46,19 @@ This will add the following to your build file: ---- io.quarkus - quarkus-keycloak-admin-client-reactive + quarkus-keycloak-admin-rest-client io.quarkus - quarkus-resteasy-reactive-jackson + quarkus-rest-jackson ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-keycloak-admin-client-reactive") -implementation("io.quarkus:quarkus-resteasy-reactive-jackson") +implementation("io.quarkus:quarkus-keycloak-admin-rest-client") +implementation("io.quarkus:quarkus-rest-jackson") ---- We also are going to need a simple resource with a `Keycloak` injected as request scoped CDI bean. diff --git a/docs/src/main/asciidoc/security-keycloak-authorization.adoc b/docs/src/main/asciidoc/security-keycloak-authorization.adoc index f4a3eabe6fdd5..36ca2db1514e4 100644 --- a/docs/src/main/asciidoc/security-keycloak-authorization.adoc +++ b/docs/src/main/asciidoc/security-keycloak-authorization.adoc @@ -82,7 +82,7 @@ First, we need a new project. Create a new project with the following command: :create-app-artifact-id: security-keycloak-authorization-quickstart -:create-app-extensions: oidc,keycloak-authorization,resteasy-reactive-jackson +:create-app-extensions: oidc,keycloak-authorization,rest-jackson include::{includes}/devtools/create-app.adoc[] This command generates a project, importing the `keycloak-authorization` extension. diff --git a/docs/src/main/asciidoc/security-ldap.adoc b/docs/src/main/asciidoc/security-ldap.adoc index c33a0e10a8a35..83b1695367a83 100644 --- a/docs/src/main/asciidoc/security-ldap.adoc +++ b/docs/src/main/asciidoc/security-ldap.adoc @@ -46,7 +46,7 @@ The solution is located in the `security-ldap-quickstart` link:{quickstarts-tree First, we need a new project. Create a new project with the following command: :create-app-artifact-id: security-ldap-quickstart -:create-app-extensions: elytron-security-ldap,resteasy-reactive +:create-app-extensions: elytron-security-ldap,rest include::{includes}/devtools/create-app.adoc[] This command generates a project, importing the `elytron-security-ldap` extension diff --git a/docs/src/main/asciidoc/security-oauth2.adoc b/docs/src/main/asciidoc/security-oauth2.adoc index cf216a14c8225..b4ece34f5f3fd 100644 --- a/docs/src/main/asciidoc/security-oauth2.adoc +++ b/docs/src/main/asciidoc/security-oauth2.adoc @@ -37,7 +37,7 @@ It contains a very simple UI to use the Jakarta REST resources created here, too First, we need a new project. Create a new project with the following command: :create-app-artifact-id: security-oauth2-quickstart -:create-app-extensions: resteasy-reactive-jackson,security-oauth2 +:create-app-extensions: rest-jackson,security-oauth2 include::{includes}/devtools/create-app.adoc[] This command generates a project and imports the `elytron-security-oauth2` extension, which includes the OAuth2 opaque token support. @@ -290,7 +290,7 @@ And executed using `java -jar target/quarkus-app/quarkus-run.jar`: ... $ java -jar target/quarkus-app/quarkus-run.jar 2019-03-28 14:27:48,839 INFO [io.quarkus] (main) Quarkus {quarkus-version} started in 0.796s. Listening on: http://[::]:8080 -2019-03-28 14:27:48,841 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, resteasy-reactive-jackson, security, security-oauth2] +2019-03-28 14:27:48,841 INFO [io.quarkus] (main) Installed features: [cdi, rest, rest-jackson, security, security-oauth2] ---- You can also generate the native executable with: @@ -318,7 +318,7 @@ include::{includes}/devtools/build-native.adoc[] $ ./target/security-oauth2-quickstart-runner 2019-03-28 14:31:37,315 INFO [io.quarkus] (main) Quarkus 0.20.0 started in 0.006s. Listening on: http://[::]:8080 -2019-03-28 14:31:37,316 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, resteasy-reactive-jackson, security, security-oauth2] +2019-03-28 14:31:37,316 INFO [io.quarkus] (main) Installed features: [cdi, rest, rest-jackson, security, security-oauth2] ---- [[integration-testing]] diff --git a/docs/src/main/asciidoc/security-oidc-auth0-tutorial.adoc b/docs/src/main/asciidoc/security-oidc-auth0-tutorial.adoc index 7c52d1b14c281..c44e4346d19eb 100644 --- a/docs/src/main/asciidoc/security-oidc-auth0-tutorial.adoc +++ b/docs/src/main/asciidoc/security-oidc-auth0-tutorial.adoc @@ -46,10 +46,10 @@ In the steps that follow, you will continue to configure and update the Auth0 ap == Create a Quarkus application -Use the following Maven command to create a Quarkus RESTEasy Reactive application that can be secured with the Quarkus OIDC extension. +Use the following Maven command to create a Quarkus REST (formerly RESTEasy Reactive) application that can be secured with the Quarkus OIDC extension. :create-app-artifact-id: quarkus-auth0 -:create-app-extensions: resteasy-reactive,oidc +:create-app-extensions: rest,oidc include::{includes}/devtools/create-app.adoc[] Create the application workspace and import it into your favorite IDE. @@ -622,7 +622,7 @@ Now that we have managed to use OIDC authorization code flow and used both ID to In fact, the last code example, showing the injected `UserInfo`, is a concrete example of the access token propagation, in this case, Quarkus propagates the Auth0 access token to the Auth0 `UserInfo` endpoint to acquire `UserInfo`. Quarkus does it without users having to do anything themselves. -But what about propagating access tokens to some custom services ? It is very easy to achieve in Quarkus, both for the authorization code and bearer token flows. All you need to do is to create a Reactive REST Client interface for calling the service requiring a Bearer token access and annotate it with `@AccessToken` and the access token arriving to the front-end endpoint as the Auth0 Bearer access token or acquired by Quarkus after completing the Auth0 authorization code flow, will be propagated to the target microservice. This is as easy as it can get. +But what about propagating access tokens to some custom services ? It is very easy to achieve in Quarkus, both for the authorization code and bearer token flows. All you need to do is to create a REST Client interface for calling the service requiring a Bearer token access and annotate it with `@AccessToken` and the access token arriving to the front-end endpoint as the Auth0 Bearer access token or acquired by Quarkus after completing the Auth0 authorization code flow, will be propagated to the target microservice. This is as easy as it can get. For examples of propagating access tokens, see the following sections in this tutorial. For more information about token propagation, see xref:security-openid-connect-client-reference.adoc#reactive-token-propagation[OIDC token propagation]. @@ -647,11 +647,11 @@ Add the following dependencies to the project to support OIDC token propagation ---- io.quarkus - quarkus-rest-client-reactive-jackson + quarkus-rest-client-jackson io.quarkus - quarkus-oidc-token-propagation-reactive + quarkus-rest-client-oidc-token-propagation ---- diff --git a/docs/src/main/asciidoc/security-oidc-bearer-token-authentication-tutorial.adoc b/docs/src/main/asciidoc/security-oidc-bearer-token-authentication-tutorial.adoc index 2d1f03259502a..6b2f9b06a891a 100644 --- a/docs/src/main/asciidoc/security-oidc-bearer-token-authentication-tutorial.adoc +++ b/docs/src/main/asciidoc/security-oidc-bearer-token-authentication-tutorial.adoc @@ -64,7 +64,7 @@ Complete one of the following commands: To create a new Maven project, use the following command: :create-app-artifact-id: security-openid-connect-quickstart -:create-app-extensions: oidc,resteasy-reactive-jackson +:create-app-extensions: oidc,rest-jackson include::{includes}/devtools/create-app.adoc[] If you already have your Quarkus project configured, you can add the `oidc` extension to your project by running the following command in your project base directory: @@ -231,7 +231,7 @@ For more information, see the Keycloak documentation about link:https://www.keyc [NOTE] ==== -If you want to use the Keycloak Admin Client to configure your server from your application, you need to include either the `quarkus-keycloak-admin-client` or the `quarkus-keycloak-admin-client-reactive` (if the application uses `quarkus-rest-client-reactive`) extension. +If you want to use the Keycloak Admin Client to configure your server from your application, you need to include either the `quarkus-keycloak-admin-rest-client` or the `quarkus-keycloak-admin-resteasy-client` (if the application uses `quarkus-rest-client`) extension. For more information, see the xref:security-keycloak-admin-client.adoc[Quarkus Keycloak Admin Client] guide. ==== diff --git a/docs/src/main/asciidoc/security-oidc-code-flow-authentication-tutorial.adoc b/docs/src/main/asciidoc/security-oidc-code-flow-authentication-tutorial.adoc index 05f3861b76bdb..4ccd40e661a68 100644 --- a/docs/src/main/asciidoc/security-oidc-code-flow-authentication-tutorial.adoc +++ b/docs/src/main/asciidoc/security-oidc-code-flow-authentication-tutorial.adoc @@ -52,7 +52,7 @@ First, we need a new project. Create a new project by running the following command: :create-app-artifact-id: security-openid-connect-web-authentication-quickstart -:create-app-extensions: resteasy-reactive,oidc +:create-app-extensions: rest,oidc include::{includes}/devtools/create-app.adoc[] If you already have your Quarkus project configured, you can add the `oidc` extension to your project by running the following command in your project base directory: diff --git a/docs/src/main/asciidoc/security-openid-connect-client-reference.adoc b/docs/src/main/asciidoc/security-openid-connect-client-reference.adoc index 155aa0516065f..0a7475d5dafac 100644 --- a/docs/src/main/asciidoc/security-openid-connect-client-reference.adoc +++ b/docs/src/main/asciidoc/security-openid-connect-client-reference.adoc @@ -14,8 +14,8 @@ You can use Quarkus extensions for OpenID Connect and OAuth 2.0 access token man This includes the following: - - Using `quarkus-oidc-client`, `quarkus-oidc-client-reactive-filter` and `quarkus-oidc-client-filter` extensions to acquire and refresh access tokens from OpenID Connect and OAuth 2.0 compliant Authorization Servers such as link:https://www.keycloak.org[Keycloak]. - - Using `quarkus-oidc-token-propagation-reactive` and `quarkus-oidc-token-propagation` extensions to propagate the current `Bearer` or `Authorization Code Flow` access tokens. + - Using `quarkus-oidc-client`, `quarkus-rest-client-oidc-filter` and `quarkus-resteasy-client-oidc-filter` extensions to acquire and refresh access tokens from OpenID Connect and OAuth 2.0 compliant Authorization Servers such as link:https://www.keycloak.org[Keycloak]. + - Using `quarkus-rest-client-oidc-token-propagation` and `quarkus-resteasy-client-oidc-token-propagation` extensions to propagate the current `Bearer` or `Authorization Code Flow` access tokens. The access tokens managed by these extensions can be used as HTTP Authorization Bearer tokens to access the remote services. @@ -191,7 +191,7 @@ public class OidcClientResource { Tokens tokens = currentTokens; if (tokens.isAccessTokenExpired()) { - // Add @Blocking method annotation if this code is used with Reactive RestClient + // Add @Blocking method annotation if this code is used with the REST Client tokens = client.refreshTokens(tokens.getRefreshToken()).await().indefinitely(); currentTokens = tokens; } @@ -378,7 +378,7 @@ public class OidcClientRequestCustomFilter implements ClientRequestFilter { } ---- -[[oidc-client-reactive-filter]] +[[rest-client-oidc-filter]] === Use OidcClient in RestClient Reactive ClientFilter Add the following Maven Dependency: @@ -387,15 +387,15 @@ Add the following Maven Dependency: ---- io.quarkus - quarkus-oidc-client-reactive-filter + quarkus-rest-client-oidc-filter ---- Note it will also bring `io.quarkus:quarkus-oidc-client`. -`quarkus-oidc-client-reactive-filter` extension provides `io.quarkus.oidc.client.filter.OidcClientRequestReactiveFilter`. +`quarkus-rest-client-oidc-filter` extension provides `io.quarkus.oidc.client.filter.OidcClientRequestReactiveFilter`. -It works similarly to the way `OidcClientRequestFilter` does (see <>) - it uses `OidcClient` to acquire the access token, refresh it if needed, and set it as an HTTP `Authorization` `Bearer` scheme value. The difference is that it works with xref:rest-client-reactive.adoc[Reactive RestClient] and implements a non-blocking client filter that does not block the current IO thread when acquiring or refreshing the tokens. +It works similarly to the way `OidcClientRequestFilter` does (see <>) - it uses `OidcClient` to acquire the access token, refresh it if needed, and set it as an HTTP `Authorization` `Bearer` scheme value. The difference is that it works with xref:rest-client.adoc[Reactive RestClient] and implements a non-blocking client filter that does not block the current IO thread when acquiring or refreshing the tokens. `OidcClientRequestReactiveFilter` delays an initial token acquisition until it is executed to avoid blocking an IO thread. @@ -437,8 +437,8 @@ public interface ProtectedResourceService { } ---- -`OidcClientRequestReactiveFilter` uses a default `OidcClient` by default. A named `OidcClient` can be selected with a `quarkus.oidc-client-reactive-filter.client-name` configuration property. -You can also select `OidcClient` by setting the `value` attribute of the `@OidcClientFilter` annotation. The client name set through annotation has higher priority than the `quarkus.oidc-client-reactive-filter.client-name` configuration property. +`OidcClientRequestReactiveFilter` uses a default `OidcClient` by default. A named `OidcClient` can be selected with a `quarkus.rest-client-oidc-filter.client-name` configuration property. +You can also select `OidcClient` by setting the `value` attribute of the `@OidcClientFilter` annotation. The client name set through annotation has higher priority than the `quarkus.rest-client-oidc-filter.client-name` configuration property. For example, given <> `jwt-secret` named OIDC client declaration, you can refer to this client like this: [source,java] @@ -458,7 +458,7 @@ public interface ProtectedResourceService { } ---- -[[oidc-client-filter]] +[[resteasy-client-oidc-filter]] === Use OidcClient in RestClient ClientFilter Add the following Maven Dependency: @@ -467,13 +467,13 @@ Add the following Maven Dependency: ---- io.quarkus - quarkus-oidc-client-filter + quarkus-resteasy-client-oidc-filter ---- Note it will also bring `io.quarkus:quarkus-oidc-client`. -`quarkus-oidc-client-filter` extension provides `io.quarkus.oidc.client.filter.OidcClientRequestFilter` Jakarta REST ClientRequestFilter which uses `OidcClient` to acquire the access token, refresh it if needed, and set it as an HTTP `Authorization` `Bearer` scheme value. +`quarkus-resteasy-client-oidc-filter` extension provides `io.quarkus.oidc.client.filter.OidcClientRequestFilter` Jakarta REST ClientRequestFilter which uses `OidcClient` to acquire the access token, refresh it if needed, and set it as an HTTP `Authorization` `Bearer` scheme value. By default, this filter will get `OidcClient` to acquire the first pair of access and refresh tokens at its initialization time. If the access tokens are short-lived and refresh tokens are unavailable, then the token acquisition should be delayed with `quarkus.oidc-client.early-tokens-acquisition=false`. @@ -512,10 +512,10 @@ public interface ProtectedResourceService { } ---- -Alternatively, `OidcClientRequestFilter` can be registered automatically with all MP Rest or Jakarta REST clients if the `quarkus.oidc-client-filter.register-filter=true` property is set. +Alternatively, `OidcClientRequestFilter` can be registered automatically with all MP Rest or Jakarta REST clients if the `quarkus.resteasy-client-oidc-filter.register-filter=true` property is set. -`OidcClientRequestFilter` uses a default `OidcClient` by default. A named `OidcClient` can be selected with a `quarkus.oidc-client-filter.client-name` configuration property. -You can also select `OidcClient` by setting the `value` attribute of the `@OidcClientFilter` annotation. The client name set through annotation has higher priority than the `quarkus.oidc-client-filter.client-name` configuration property. +`OidcClientRequestFilter` uses a default `OidcClient` by default. A named `OidcClient` can be selected with a `quarkus.resteasy-client-oidc-filter.client-name` configuration property. +You can also select `OidcClient` by setting the `value` attribute of the `@OidcClientFilter` annotation. The client name set through annotation has higher priority than the `quarkus.resteasy-client-oidc-filter.client-name` configuration property. For example, given <> `jwt-secret` named OIDC client declaration, you can refer to this client like this: [source,java] @@ -721,7 +721,7 @@ You can use `OidcClient` methods for acquiring or refreshing tokens which accept If you work work with the OIDC client filters then you must register a custom filter which will provide this assertion. -Here is an example of the RestEasy Reactive custom filter: +Here is an example of the Quarkus REST (formerly RESTEasy Reactive) custom filter: [source,java] ---- @@ -981,7 +981,7 @@ public class OidcRequestCustomizer implements OidcRequestFilter { [[token-propagation-reactive]] == Token Propagation Reactive -The `quarkus-oidc-token-propagation-reactive` extension provides a RestEasy Reactive Client, `io.quarkus.oidc.token.propagation.reactive.AccessTokenRequestReactiveFilter`, that simplifies the propagation of authentication information. This client propagates the xref:security-oidc-bearer-token-authentication.adoc[bearer token] present in the currently active request or the token acquired from the xref:security-oidc-code-flow-authentication.adoc[authorization code flow mechanism] as the HTTP `Authorization` header's `Bearer` scheme value. +The `quarkus-rest-client-oidc-token-propagation` extension provides a REST Client, `io.quarkus.oidc.token.propagation.reactive.AccessTokenRequestReactiveFilter`, that simplifies the propagation of authentication information. This client propagates the xref:security-oidc-bearer-token-authentication.adoc[bearer token] present in the currently active request or the token acquired from the xref:security-oidc-code-flow-authentication.adoc[authorization code flow mechanism] as the HTTP `Authorization` header's `Bearer` scheme value. You can selectively register `AccessTokenRequestReactiveFilter` by using either `io.quarkus.oidc.token.propagation.AccessToken` or `org.eclipse.microprofile.rest.client.annotation.RegisterProvider` annotation, for example: @@ -1049,7 +1049,7 @@ quarkus.oidc-client.grant.type=jwt quarkus.oidc-client.grant-options.jwt.requested_token_use=on_behalf_of quarkus.oidc-client.scopes=https://graph.microsoft.com/user.read,offline_access -quarkus.oidc-token-propagation-reactive.exchange-token=true +quarkus.oidc-token-propagation.exchange-token=true ---- `AccessTokenRequestReactiveFilter` uses a default `OidcClient` by default. A named `OidcClient` can be selected with a `quarkus.oidc-token-propagation-reactive.client-name` configuration property or with the `io.quarkus.oidc.token.propagation.AccessToken#exchangeTokenClient` annotation attribute. @@ -1057,7 +1057,7 @@ quarkus.oidc-token-propagation-reactive.exchange-token=true [[token-propagation]] == Token Propagation -The `quarkus-oidc-token-propagation` extension provides two Jakarta REST `jakarta.ws.rs.client.ClientRequestFilter` class implementations that simplify the propagation of authentication information. +The `quarkus-resteasy-client-oidc-token-propagation` extension provides two Jakarta REST `jakarta.ws.rs.client.ClientRequestFilter` class implementations that simplify the propagation of authentication information. `io.quarkus.oidc.token.propagation.AccessTokenRequestFilter` propagates the xref:security-oidc-bearer-token-authentication.adoc[Bearer token] present in the current active request or the token acquired from the xref:security-oidc-code-flow-authentication.adoc[Authorization code flow mechanism], as the HTTP `Authorization` header's `Bearer` scheme value. The `io.quarkus.oidc.token.propagation.JsonWebTokenRequestFilter` provides the same functionality but, in addition, provides support for JWT tokens. @@ -1183,7 +1183,7 @@ public interface ProtectedResourceService { } ---- -Alternatively, `JsonWebTokenRequestFilter` can be registered automatically with all MicroProfile REST or Jakarta REST clients if both `quarkus.oidc-token-propagation.register-filter` and `quarkus.oidc-token-propagation.json-web-token` properties are set to `true`. +Alternatively, `JsonWebTokenRequestFilter` can be registered automatically with all MicroProfile REST or Jakarta REST clients if both `quarkus.oidc-token-propagation.register-filter` and `quarkus.resteasy-client-oidc-token-propagation.json-web-token` properties are set to `true`. ==== Update token before propagation @@ -1191,7 +1191,7 @@ If the injected token needs to have its `iss` (issuer) or `aud` (audience) claim [source,properties] ---- -quarkus.oidc-token-propagation.secure-json-web-token=true +quarkus.resteasy-client-oidc-token-propagation.secure-json-web-token=true smallrye.jwt.sign.key.location=/privateKey.pem # Set a new issuer smallrye.jwt.new-token.issuer=http://frontend-resource @@ -1207,7 +1207,7 @@ As mentioned, use `AccessTokenRequestFilter` if you work with Keycloak or an Ope === Testing You can generate the tokens as described in xref:security-oidc-bearer-token-authentication.adoc#integration-testing[OpenID Connect Bearer Token Integration testing] section. -Prepare the REST test endpoints. You can have the test front-end endpoint, which uses the injected MP REST client with a registered token propagation filter, call the downstream endpoint. For example, see the `integration-tests/oidc-token-propagation` in the `main` Quarkus repository. +Prepare the REST test endpoints. You can have the test front-end endpoint, which uses the injected MP REST client with a registered token propagation filter, call the downstream endpoint. For example, see the `integration-tests/resteasy-client-oidc-token-propagation` in the `main` Quarkus repository. [[reactive-token-propagation]] == Token Propagation Reactive @@ -1218,13 +1218,13 @@ Add the following Maven Dependency: ---- io.quarkus - quarkus-oidc-token-propagation-reactive + quarkus-rest-client-resteasy-client-oidc-token-propagation ---- -The `quarkus-oidc-token-propagation-reactive` extension provides `io.quarkus.oidc.token.propagation.reactive.AccessTokenRequestReactiveFilter` which can be used to propagate the current `Bearer` or `Authorization Code Flow` access tokens. +The `quarkus-rest-client-resteasy-client-oidc-token-propagation` extension provides `io.quarkus.oidc.token.propagation.reactive.AccessTokenRequestReactiveFilter` which can be used to propagate the current `Bearer` or `Authorization Code Flow` access tokens. -The `quarkus-oidc-token-propagation-reactive` extension (as opposed to the non-reactive `quarkus-oidc-token-propagation` extension) does not currently support the exchanging or resigning of the tokens before the propagation. +The `quarkus-rest-client-resteasy-client-oidc-token-propagation` extension (as opposed to the non-reactive `quarkus-resteasy-client-oidc-token-propagation` extension) does not currently support the exchanging or resigning of the tokens before the propagation. However, these features might be added in the future. [[oidc-client-graphql-client]] diff --git a/docs/src/main/asciidoc/security-openid-connect-client.adoc b/docs/src/main/asciidoc/security-openid-connect-client.adoc index 2e0f6906e3584..f07416d456918 100644 --- a/docs/src/main/asciidoc/security-openid-connect-client.adoc +++ b/docs/src/main/asciidoc/security-openid-connect-client.adoc @@ -65,14 +65,14 @@ First, you need a new project. Create a new project with the following command: :create-app-artifact-id: security-openid-connect-client-quickstart -:create-app-extensions: oidc,oidc-client-reactive-filter,oidc-token-propagation-reactive,resteasy-reactive +:create-app-extensions: oidc,rest-client-oidc-filter,rest-client-oidc-token-propagation,rest include::{includes}/devtools/create-app.adoc[] -This command generates a Maven project, importing the `oidc`, `oidc-client-reactive-filter`, `oidc-token-propagation-reactive-filter`, and `resteasy-reactive` extensions. +This command generates a Maven project, importing the `oidc`, `rest-client-oidc-filter`, `rest-client-oidc-token-propagation`, and `rest` extensions. If you already have your Quarkus project configured, you can add these extensions to your project by running the following command in your project base directory: -:add-extension-extensions: oidc,oidc-client-reactive-filter,oidc-token-propagation-reactive,resteasy-reactive +:add-extension-extensions: oidc,rest-client-oidc-filter,rest-client-oidc-token-propagation,rest include::{includes}/devtools/extension-add.adoc[] This command adds the following extensions to your build file: @@ -86,22 +86,22 @@ This command adds the following extensions to your build file: io.quarkus - quarkus-oidc-client-reactive-filter + quarkus-rest-client-oidc-filter io.quarkus - quarkus-oidc-token-propagation-reactive + quarkus-rest-client-oidc-token-propagation io.quarkus - quarkus-resteasy-reactive + quarkus-rest ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-oidc,oidc-client-reactive-filter,oidc-token-propagation-reactive,resteasy-reactive") +implementation("io.quarkus:quarkus-oidc,rest-client-oidc-filter,rest-client-oidc-token-propagation,rest") ---- == Writing the application @@ -309,7 +309,7 @@ public class FrontendExceptionMapper implements ExceptionMapper io.quarkus - quarkus-resteasy-reactive-jackson + quarkus-rest-jackson ---- @@ -75,7 +75,7 @@ This will add the following to your build file: implementation("io.quarkus:quarkus-spring-web") implementation("io.quarkus:quarkus-spring-security") implementation("io.quarkus:quarkus-elytron-security-properties-file") -implementation("io.quarkus:quarkus-resteasy-reactive-jackson") +implementation("io.quarkus:quarkus-rest-jackson") ---- For more information about `security-properties-file`, you can check out the guide of the xref:security-properties.adoc[quarkus-elytron-security-properties-file] extension. diff --git a/docs/src/main/asciidoc/spring-web.adoc b/docs/src/main/asciidoc/spring-web.adoc index a7f88c54aa71e..2880f83f71c1b 100644 --- a/docs/src/main/asciidoc/spring-web.adoc +++ b/docs/src/main/asciidoc/spring-web.adoc @@ -34,7 +34,7 @@ The solution is located in the `spring-web-quickstart` link:{quickstarts-tree-ur First, we need a new project. Create a new project with the following command: :create-app-artifact-id: spring-web-quickstart -:create-app-extensions: spring-web,resteasy-reactive-jackson +:create-app-extensions: spring-web,rest-jackson include::{includes}/devtools/create-app.adoc[] This command generates a project which imports the `spring-web` extension. @@ -42,7 +42,7 @@ This command generates a project which imports the `spring-web` extension. If you already have your Quarkus project configured, you can add the `spring-web` extension to your project by running the following command in your project base directory: -:add-extension-extensions: spring-web,resteasy-reactive-jackson +:add-extension-extensions: spring-web,rest-jackson include::{includes}/devtools/extension-add.adoc[] This will add the following to your build file: @@ -56,7 +56,7 @@ This will add the following to your build file: io.quarkus - quarkus-resteasy-reactive-jackson + quarkus-rest-jackson ---- @@ -64,12 +64,12 @@ This will add the following to your build file: .build.gradle ---- implementation("io.quarkus:quarkus-spring-web") -implementation("io.quarkus:quarkus-resteasy-reactive-jackson") +implementation("io.quarkus:quarkus-rest-jackson") ---- [IMPORTANT] ==== -`quarkus-spring-web` needs to be complemented with either `quarkus-resteasy-reactive-jackson` or `quarkus-resteasy-jackson` in order to work. +`quarkus-spring-web` needs to be complemented with either `quarkus-rest-jackson` or `quarkus-resteasy-jackson` in order to work. ==== == GreetingController diff --git a/docs/src/main/asciidoc/stork-kubernetes.adoc b/docs/src/main/asciidoc/stork-kubernetes.adoc index d8ffdc6e207ec..b939eb34bd1b2 100644 --- a/docs/src/main/asciidoc/stork-kubernetes.adoc +++ b/docs/src/main/asciidoc/stork-kubernetes.adoc @@ -61,10 +61,10 @@ The various integrations in Quarkus extract the location of the service from tha == Bootstrapping the project -Create a Quarkus project importing the quarkus-rest-client-reactive and quarkus-resteasy-reactive extensions using your favorite approach: +Create a Quarkus project importing the quarkus-rest-client and quarkus-rest extensions using your favorite approach: :create-app-artifact-id: stork-kubernetes-quickstart -:create-app-extensions: quarkus-rest-client-reactive,quarkus-resteasy-reactive +:create-app-extensions: quarkus-rest-client,quarkus-rest include::{includes}/devtools/create-app.adoc[] In the generated project, also add the following dependencies: @@ -308,7 +308,7 @@ NOTE: Stork is not limited to Kubernetes and integrates with other service disco So far, we didn't use Stork; we just deployed the services we will be discovering, selecting, and calling. -We will call the services using the Reactive REST Client. +We will call the services using the REST Client. Create the `src/main/java/org/acme/MyService.java` file with the following content: [source, java] diff --git a/docs/src/main/asciidoc/stork-reference.adoc b/docs/src/main/asciidoc/stork-reference.adoc index 44636a78ff2e4..0e7c9ec907b0d 100644 --- a/docs/src/main/asciidoc/stork-reference.adoc +++ b/docs/src/main/asciidoc/stork-reference.adoc @@ -19,7 +19,7 @@ include::{includes}/extension-status.adoc[] The current integration of Stork supports: -* the Reactive REST Client +* the REST Client * the gRPC clients Warning: The gRPC client integration does not support statistic-based load balancers. diff --git a/docs/src/main/asciidoc/stork.adoc b/docs/src/main/asciidoc/stork.adoc index e74d2efce9e43..5f2fe9e2329e7 100644 --- a/docs/src/main/asciidoc/stork.adoc +++ b/docs/src/main/asciidoc/stork.adoc @@ -70,10 +70,10 @@ image::stork-process.png[Discovery and Selection of services,width=50%, align=ce == Bootstrapping the project -Create a Quarkus project importing the quarkus-rest-client-reactive and quarkus-resteasy-reactive extensions using your favorite approach: +Create a Quarkus project importing the quarkus-rest-client and quarkus-rest extensions using your favorite approach: :create-app-artifact-id: stork-quickstart -:create-app-extensions: quarkus-rest-client-reactive,quarkus-resteasy-reactive +:create-app-extensions: quarkus-rest-client,quarkus-rest include::{includes}/devtools/create-app.adoc[] In the generated project, also add the following dependencies: @@ -227,7 +227,7 @@ Both registration uses the same name (`my-service`), but different ids to indica So far, we didn't use Stork; we just scaffolded the services we will be discovering, selecting, and calling. -We will call the services using the Reactive REST Client. +We will call the services using the REST Client. Create the `src/main/java/org/acme/MyService.java` file with the following content: [source, java] diff --git a/docs/src/main/asciidoc/telemetry-micrometer-tutorial.adoc b/docs/src/main/asciidoc/telemetry-micrometer-tutorial.adoc index 925db62fa4f81..3fee28c02168b 100644 --- a/docs/src/main/asciidoc/telemetry-micrometer-tutorial.adoc +++ b/docs/src/main/asciidoc/telemetry-micrometer-tutorial.adoc @@ -34,7 +34,7 @@ The solution is located in the `micrometer-quickstart` link:{quickstarts-tree-ur Create a new project with the following command: :create-app-artifact-id: micrometer-quickstart -:create-app-extensions: resteasy-reactive,micrometer-registry-prometheus +:create-app-extensions: rest,micrometer-registry-prometheus include::{includes}/devtools/create-app.adoc[] This command generates a Maven project, that imports the `micrometer-registry-prometheus` extension as a dependency. diff --git a/docs/src/main/asciidoc/telemetry-micrometer.adoc b/docs/src/main/asciidoc/telemetry-micrometer.adoc index 7f89d5948fa5e..22bcce923ddea 100644 --- a/docs/src/main/asciidoc/telemetry-micrometer.adoc +++ b/docs/src/main/asciidoc/telemetry-micrometer.adoc @@ -746,9 +746,9 @@ Refer to the xref:./management-interface-reference.adoc[management interface ref * https://quarkus.io/guides/mongodb[`quarkus-mongodb-client`] * https://quarkus.io/extensions/io.quarkus/quarkus-netty[`quarkus-netty`] * https://quarkus.io/guides/redis[`quarkus-redis-client`] -* https://quarkus.io/guides/resteasy-client[`quarkus-resteasy-client`] +* https://quarkus.io/guides/rest[`quarkus-rest`] * https://quarkus.io/guides/resteasy[`quarkus-resteasy-jackson`] -* https://quarkus.io/guides/resteasy-reactive[`quarkus-resteasy-reactive`] +* https://quarkus.io/guides/resteasy-client[`quarkus-resteasy-client`] * https://quarkus.io/guides/scheduler[`quarkus-scheduler`] * https://quarkus.io/guides/smallrye-graphql[`quarkus-smallrye-graphql`] * https://quarkus.io/extensions/io.quarkus/quarkus-smallrye-reactive-messaging[`quarkus-smallrye-reactive-messaging`] diff --git a/docs/src/main/asciidoc/telemetry-opentracing-to-otel-tutorial.adoc b/docs/src/main/asciidoc/telemetry-opentracing-to-otel-tutorial.adoc index 66046da528010..5f381e63294ec 100644 --- a/docs/src/main/asciidoc/telemetry-opentracing-to-otel-tutorial.adoc +++ b/docs/src/main/asciidoc/telemetry-opentracing-to-otel-tutorial.adoc @@ -53,7 +53,7 @@ This tutorial is built on top of the `opentracing-quickstart` legacy project. Create the legacy project by executing the following command: :create-app-artifact-id: opentracing-quickstart -:create-app-extensions: resteasy-reactive,quarkus-smallrye-opentracing +:create-app-extensions: rest,quarkus-smallrye-opentracing :create-app-code: include::{includes}/devtools/create-app.adoc[] @@ -88,7 +88,7 @@ public class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { - return "Hello from RESTEasy Reactive"; + return "Hello from Quarkus REST"; } } ---- @@ -255,7 +255,7 @@ public class GreetingResource { Span innerSpan = legacyTracer.buildSpan("Count response chars").start(); try (Scope dbScope = legacyTracer.scopeManager().activate(innerSpan)) { - String response = "Hello from RESTEasy Reactive"; + String response = "Hello from Quarkus REST"; innerSpan.setTag("response-chars-count", response.length()); return response; } catch (Exception e) { @@ -355,7 +355,7 @@ public class GreetingResource { // Create a manual inner span Span innerSpan = otelTracer.spanBuilder("Count response chars").startSpan(); try (Scope scope = innerSpan.makeCurrent()) { - final String response = "Hello from RESTEasy Reactive"; + final String response = "Hello from Quarkus REST"; innerSpan.setAttribute("response-chars-count", response.length()); return response; } catch (Exception e) { @@ -458,7 +458,7 @@ public class GreetingResource { Span innerSpan = legacyTracer.buildSpan("Count response chars").start(); try (Scope dbScope = legacyTracer.scopeManager().activate(innerSpan)) { - String response = "Hello from RESTEasy Reactive"; + String response = "Hello from Quarkus REST"; innerSpan.setTag("response-chars-count", response.length()); return response; } catch (Exception e) { @@ -514,7 +514,7 @@ public class GreetingResource { Span innerSpan = legacyTracer.buildSpan("Count response chars").start(); try (Scope dbScope = legacyTracer.scopeManager().activate(innerSpan)) { - String response = "Hello from RESTEasy Reactive"; + String response = "Hello from Quarkus REST"; innerSpan.setTag("response-chars-count", response.length()); return response; } catch (Exception e) { diff --git a/docs/src/main/asciidoc/tests-with-coverage.adoc b/docs/src/main/asciidoc/tests-with-coverage.adoc index f6fa95f12ddaa..84d37845270da 100644 --- a/docs/src/main/asciidoc/tests-with-coverage.adoc +++ b/docs/src/main/asciidoc/tests-with-coverage.adoc @@ -45,7 +45,7 @@ The solution is located in the `tests-with-coverage-quickstart` link:{quickstart Let's start from an empty application created with the Quarkus Maven plugin: :create-app-artifact-id: tests-with-coverage-quickstart -:create-app-extensions: resteasy-reactive +:create-app-extensions: rest include::{includes}/devtools/create-app.adoc[] Now we'll be adding all the elements necessary to have an application that is properly covered with tests. diff --git a/docs/src/main/asciidoc/validation.adoc b/docs/src/main/asciidoc/validation.adoc index 26798ae318aa2..60bbc6be1eb68 100644 --- a/docs/src/main/asciidoc/validation.adoc +++ b/docs/src/main/asciidoc/validation.adoc @@ -41,10 +41,10 @@ The solution is located in the `validation-quickstart` link:{quickstarts-tree-ur First, we need a new project. Create a new project with the following command: :create-app-artifact-id: validation-quickstart -:create-app-extensions: resteasy-reactive-jackson,hibernate-validator +:create-app-extensions: rest-jackson,hibernate-validator include::{includes}/devtools/create-app.adoc[] -This command generates a Maven structure importing the RESTEasy Reactive/Jakarta REST, Jackson and Hibernate Validator/Bean Validation extensions. +This command generates a Maven structure importing the Quarkus REST (formerly RESTEasy Reactive)/Jakarta REST, Jackson and Hibernate Validator/Bean Validation extensions. If you already have your Quarkus project configured, you can add the `hibernate-validator` extension to your project by running the following command in your project base directory: @@ -387,7 +387,7 @@ You can configure this behavior by adding the following configuration in your `a quarkus.default-locale=fr-FR ---- -If you are using RESTEasy Reactive or RESTEasy Classic, in the context of a Jakarta REST endpoint, +If you are using Quarkus REST or RESTEasy Classic, in the context of a Jakarta REST endpoint, Hibernate Validator will automatically resolve the optimal locale to use from the `Accept-Language` HTTP header, provided the supported locales have been properly specified in the `application.properties`: diff --git a/docs/src/main/asciidoc/vertx-reference.adoc b/docs/src/main/asciidoc/vertx-reference.adoc index 0d940abd968b8..88f5105834800 100644 --- a/docs/src/main/asciidoc/vertx-reference.adoc +++ b/docs/src/main/asciidoc/vertx-reference.adoc @@ -144,7 +144,7 @@ To learn more about the usage of the Vert.x Mutiny API, refer to https://smallry === Use the Vert.x Web Client -This section gives an example using the Vert.x `WebClient` in the context of a RESTEasy Reactive application. +This section gives an example using the Vert.x `WebClient` in the context of a Quarkus REST (formerly RESTEasy Reactive) application. As indicated in the table above, add the following dependency to your project: [source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"] @@ -254,7 +254,7 @@ Note that these features use the mapper managed by the `quarkus-jackson` extensi Refer to xref:rest-json.adoc#json[Jackson configuration] to customize the mapping. -JSON Object and JSON Array are both supported as Quarkus HTTP endpoint requests and response bodies (using classic RESTEasy and RESTEasy Reactive). +JSON Object and JSON Array are both supported as Quarkus HTTP endpoint requests and response bodies (using classic RESTEasy and Quarkus REST). Consider these endpoints: @@ -815,7 +815,7 @@ public class EventResource { <2> when we get the response, extract the body and send it to the user NOTE: the HTTP method returns a `Uni`. -If you are using RESTEasy Reactive, `Uni` support is built-in. +If you are using Quarkus REST, `Uni` support is built-in. If you are using _classic_ RESTEasy, you need to add the `quarkus resteasy-mutiny` extension to your project. We need a consumer listening on the `greeting` address. diff --git a/docs/src/main/asciidoc/vertx.adoc b/docs/src/main/asciidoc/vertx.adoc index c5bbb73681ebd..43c074063a503 100644 --- a/docs/src/main/asciidoc/vertx.adoc +++ b/docs/src/main/asciidoc/vertx.adoc @@ -55,10 +55,10 @@ If you are not familiar with Mutiny, check xref:mutiny-primer.adoc[Mutiny - an i == Bootstrapping the application -Click on https://code.quarkus.io/?a=quarkus-getting-started-vertx&nc=true&e=resteasy-reactive-jackson&e=vertx[this link] to configure your application. +Click on https://code.quarkus.io/?a=quarkus-getting-started-vertx&nc=true&e=rest-jackson&e=vertx[this link] to configure your application. It selected a few extensions: -* `resteasy-reactive-jackson`, which also brings `resteasy-reactive`. We are going to use it to expose our HTTP endpoints. +* `rest-jackson`, which also brings `rest`. We are going to use it to expose our HTTP endpoints. * `vertx`, which provides access to the underlying managed Vert.x Click on the `Generate your application` button, download the zip file and unzip it. @@ -71,7 +71,7 @@ If you open the generated build file, you can see the selected extensions: ---- io.quarkus - quarkus-resteasy-reactive-jackson + quarkus-rest-jackson io.quarkus @@ -82,7 +82,7 @@ If you open the generated build file, you can see the selected extensions: [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-resteasy-reactive-jackson") +implementation("io.quarkus:quarkus-rest-jackson") implementation("io.quarkus:quarkus-vertx") ---- diff --git a/docs/src/main/asciidoc/virtual-threads.adoc b/docs/src/main/asciidoc/virtual-threads.adoc index 2ee3545979f74..72257ae91acfc 100644 --- a/docs/src/main/asciidoc/virtual-threads.adoc +++ b/docs/src/main/asciidoc/virtual-threads.adoc @@ -85,7 +85,7 @@ In Quarkus, the support of virtual thread is implemented using the link:{runonvt This section briefly overviews the rationale and how to use it. There are dedicated guides for extensions supporting that annotation, such as: -- xref:./resteasy-reactive-virtual-threads.adoc[Virtual threads in REST applications] +- xref:./rest-virtual-threads.adoc[Virtual threads in REST applications] - xref:./messaging-virtual-threads.adoc[Virtual threads in reactive messaging applications] - xref:./grpc-virtual-threads.adoc[Virtual threads in gRPC services] - xref:./scheduler-reference.adoc#virtual_threads[Execute periodic tasks on virtual threads] @@ -160,7 +160,7 @@ For each of them, the object stored in the `ThreadLocal` is created (often large This problem leads to high memory usage. Unfortunately, it requires sophisticated code changes in the libraries themselves. -=== Use @RunOnVirtualThread with RESTEasy Reactive +=== Use @RunOnVirtualThread with Quarkus REST (formerly RESTEasy Reactive) This section shows a brief example of using the link:{runonvthread}[@RunOnVirtualThread] annotation. It also explains the various development and execution models offered by Quarkus. @@ -168,18 +168,18 @@ It also explains the various development and execution models offered by Quarkus The `@RunOnVirtualThread` annotation instructs Quarkus to invoke the annotated method on a **new** virtual thread instead of the current one. Quarkus handles the creation of the virtual thread and the offloading. -Since virtual threads are disposable entities, the fundamental idea of `@RunOnVirtualThread` is to offload the execution of an endpoint handler on a new virtual thread instead of running it on an event-loop or worker thread (in the case of RESTEasy Reactive). +Since virtual threads are disposable entities, the fundamental idea of `@RunOnVirtualThread` is to offload the execution of an endpoint handler on a new virtual thread instead of running it on an event-loop or worker thread (in the case of Quarkus REST). To do so, it suffices to add the link:{runonvthread}[@RunOnVirtualThread] annotation to the endpoint. If the Java Virtual Machine used to **run** the application provides virtual thread support (so Java 21 or later versions), then the endpoint execution is offloaded to a virtual thread. It will then be possible to perform blocking operations without blocking the platform thread upon which the virtual thread is mounted. -In the case of RESTEasy Reactive, this annotation can only be used on endpoints annotated with link:{blockingannotation}[@Blocking] or +In the case of Quarkus REST, this annotation can only be used on endpoints annotated with link:{blockingannotation}[@Blocking] or considered blocking because of their signature. -You can visit xref:resteasy-reactive.adoc#execution-model-blocking-non-blocking[Execution model, blocking, non-blocking] +You can visit xref:rest.adoc#execution-model-blocking-non-blocking[Execution model, blocking, non-blocking] for more information. -==== Get started with virtual threads with RESTEasy Reactive +==== Get started with virtual threads with Quarkus REST Add the following dependency to your build file: @@ -188,14 +188,14 @@ Add the following dependency to your build file: ---- io.quarkus - quarkus-resteasy-reactive + quarkus-rest ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-resteasy-reactive") +implementation("io.quarkus:quarkus-rest") ---- Then, you also need to make sure that you are using Java 21+, this can be enforced in your pom.xml file with the following: @@ -301,7 +301,7 @@ Mutiny, the reactive programming library used in Quarkus, and the Vert.x Mutiny As a result: 1. Quarkus extensions providing blocking APIs on top of reactive APIs can be used in virtual threads. -This includes the reactive rest client, the redis client, the mailer... +This includes the REST Client, the Redis client, the mailer... 2. API returning `Uni` can be used directly using `uni.await().atMost(...)`. It blocks the virtual thread, without blocking the carrier thread, and also improves the resilience of your application with an easy (non-blocking) timeout support. 3. If you use a https://smallrye.io/smallrye-mutiny-vertx-bindings/latest/[Vert.x client using the Mutiny bindings], use the `andAwait()` methods which block until you get the result without pinning the carrier thread. It includes all the reactive SQL drivers. diff --git a/docs/src/main/asciidoc/writing-extensions.adoc b/docs/src/main/asciidoc/writing-extensions.adoc index 9ce12cb7c48e7..7bf884802e9b4 100644 --- a/docs/src/main/asciidoc/writing-extensions.adoc +++ b/docs/src/main/asciidoc/writing-extensions.adoc @@ -2340,7 +2340,7 @@ If multiple extensions register a feature of the same name the build fails. The feature name should also map to a label in the extension's `devtools/common/src/main/filtered/extensions.json` entry so that the feature name displayed by the startup line matches a label that one can use to select the extension when creating a project -using the Quarkus maven plugin as shown in this example taken from the xref:rest-json.adoc[Writing JSON REST Services] guide where the `resteasy-reactive-jackson` feature is referenced: +using the Quarkus maven plugin as shown in this example taken from the xref:rest-json.adoc[Writing JSON REST Services] guide where the `rest-jackson` feature is referenced: [source,bash,subs=attributes+] ---- @@ -2349,7 +2349,7 @@ mvn {quarkus-platform-groupid}:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=rest-json \ -DclassName="org.acme.rest.json.FruitResource" \ -Dpath="/fruits" \ - -Dextensions="resteasy-reactive,resteasy-reactive-jackson" + -Dextensions="rest,rest-jackson" cd rest-json ---- diff --git a/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/legacy-extensions-codestarts/resteasy-reactive-codestart/codestart.yml b/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/legacy-extensions-codestarts/resteasy-reactive-codestart/codestart.yml index 63a3ad2f01369..84e384b4a39ef 100644 --- a/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/legacy-extensions-codestarts/resteasy-reactive-codestart/codestart.yml +++ b/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/legacy-extensions-codestarts/resteasy-reactive-codestart/codestart.yml @@ -12,7 +12,7 @@ language: resource: class-name: GreetingResource path: "/hello" - response: "Hello from RESTEasy Reactive" + response: "Hello from Quarkus REST" dependencies: - io.quarkus:quarkus-resteasy-reactive test-dependencies: diff --git a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateGradleDefaultJava/src_main_java_org_acme_GreetingResource.java b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateGradleDefaultJava/src_main_java_org_acme_GreetingResource.java index 2a175fd5de8df..bc279a527afa9 100644 --- a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateGradleDefaultJava/src_main_java_org_acme_GreetingResource.java +++ b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateGradleDefaultJava/src_main_java_org_acme_GreetingResource.java @@ -11,6 +11,6 @@ public class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { - return "Hello from RESTEasy Reactive"; + return "Hello from Quarkus REST"; } } \ No newline at end of file diff --git a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateGradleDefaultJava/src_test_java_org_acme_GreetingResourceTest.java b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateGradleDefaultJava/src_test_java_org_acme_GreetingResourceTest.java index 3a0d47d75f33e..a7146754be6b2 100644 --- a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateGradleDefaultJava/src_test_java_org_acme_GreetingResourceTest.java +++ b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateGradleDefaultJava/src_test_java_org_acme_GreetingResourceTest.java @@ -15,7 +15,7 @@ public void testHelloEndpoint() { .when().get("/hello") .then() .statusCode(200) - .body(is("Hello from RESTEasy Reactive")); + .body(is("Hello from Quarkus REST")); } } \ No newline at end of file diff --git a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateMavenDefaultJava/src_main_java_org_acme_GreetingResource.java b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateMavenDefaultJava/src_main_java_org_acme_GreetingResource.java index 2a175fd5de8df..bc279a527afa9 100644 --- a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateMavenDefaultJava/src_main_java_org_acme_GreetingResource.java +++ b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateMavenDefaultJava/src_main_java_org_acme_GreetingResource.java @@ -11,6 +11,6 @@ public class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { - return "Hello from RESTEasy Reactive"; + return "Hello from Quarkus REST"; } } \ No newline at end of file diff --git a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateMavenDefaultJava/src_test_java_org_acme_GreetingResourceTest.java b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateMavenDefaultJava/src_test_java_org_acme_GreetingResourceTest.java index 3a0d47d75f33e..a7146754be6b2 100644 --- a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateMavenDefaultJava/src_test_java_org_acme_GreetingResourceTest.java +++ b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateMavenDefaultJava/src_test_java_org_acme_GreetingResourceTest.java @@ -15,7 +15,7 @@ public void testHelloEndpoint() { .when().get("/hello") .then() .statusCode(200) - .body(is("Hello from RESTEasy Reactive")); + .body(is("Hello from Quarkus REST")); } } \ No newline at end of file diff --git a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_main_java_ilove_quark_us_GreetingResource.java b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_main_java_ilove_quark_us_GreetingResource.java index c65c013da3d95..2a53cac970f48 100644 --- a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_main_java_ilove_quark_us_GreetingResource.java +++ b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_main_java_ilove_quark_us_GreetingResource.java @@ -11,6 +11,6 @@ public class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { - return "Hello from RESTEasy Reactive"; + return "Hello from Quarkus REST"; } } \ No newline at end of file diff --git a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_main_kotlin_ilove_quark_us_GreetingResource.kt b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_main_kotlin_ilove_quark_us_GreetingResource.kt index 142f19634d0b4..9418adf418651 100644 --- a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_main_kotlin_ilove_quark_us_GreetingResource.kt +++ b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_main_kotlin_ilove_quark_us_GreetingResource.kt @@ -10,5 +10,5 @@ class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) - fun hello() = "Hello from RESTEasy Reactive" + fun hello() = "Hello from Quarkus REST" } \ No newline at end of file diff --git a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_main_scala_ilove_quark_us_GreetingResource.scala b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_main_scala_ilove_quark_us_GreetingResource.scala index 138be700d17be..b08eb907b4555 100644 --- a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_main_scala_ilove_quark_us_GreetingResource.scala +++ b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_main_scala_ilove_quark_us_GreetingResource.scala @@ -8,5 +8,5 @@ class GreetingResource { @GET @Produces(Array[String](MediaType.TEXT_PLAIN)) - def hello() = "Hello from RESTEasy Reactive" + def hello() = "Hello from Quarkus REST" } \ No newline at end of file diff --git a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_test_java_ilove_quark_us_GreetingResourceTest.java b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_test_java_ilove_quark_us_GreetingResourceTest.java index 156ce1ad54fd5..1211686f24433 100644 --- a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_test_java_ilove_quark_us_GreetingResourceTest.java +++ b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_test_java_ilove_quark_us_GreetingResourceTest.java @@ -15,7 +15,7 @@ public void testHelloEndpoint() { .when().get("/hello") .then() .statusCode(200) - .body(is("Hello from RESTEasy Reactive")); + .body(is("Hello from Quarkus REST")); } } \ No newline at end of file diff --git a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_test_kotlin_ilove_quark_us_GreetingResourceTest.kt b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_test_kotlin_ilove_quark_us_GreetingResourceTest.kt index 9fb7ef9af2908..07911a18c370f 100644 --- a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_test_kotlin_ilove_quark_us_GreetingResourceTest.kt +++ b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_test_kotlin_ilove_quark_us_GreetingResourceTest.kt @@ -14,7 +14,7 @@ class GreetingResourceTest { .`when`().get("/hello") .then() .statusCode(200) - .body(`is`("Hello from RESTEasy Reactive")) + .body(`is`("Hello from Quarkus REST")) } } \ No newline at end of file diff --git a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_test_scala_ilove_quark_us_GreetingResourceTest.scala b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_test_scala_ilove_quark_us_GreetingResourceTest.scala index 75695e6423d92..abf0f3c1199a3 100644 --- a/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_test_scala_ilove_quark_us_GreetingResourceTest.scala +++ b/independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_test_scala_ilove_quark_us_GreetingResourceTest.scala @@ -14,7 +14,7 @@ class GreetingResourceTest { .`when`().get("/hello") .then() .statusCode(200) - .body(`is`("Hello from RESTEasy Reactive")) + .body(`is`("Hello from Quarkus REST")) } } \ No newline at end of file diff --git a/integration-tests/devtools/src/test/resources/__snapshots__/RESTEasyReactiveCodestartsTest/testContent/src_main_java_ilove_quark_us_GreetingResource.java b/integration-tests/devtools/src/test/resources/__snapshots__/RESTEasyReactiveCodestartsTest/testContent/src_main_java_ilove_quark_us_GreetingResource.java index 382f19a13488c..9a7be58ad14ee 100644 --- a/integration-tests/devtools/src/test/resources/__snapshots__/RESTEasyReactiveCodestartsTest/testContent/src_main_java_ilove_quark_us_GreetingResource.java +++ b/integration-tests/devtools/src/test/resources/__snapshots__/RESTEasyReactiveCodestartsTest/testContent/src_main_java_ilove_quark_us_GreetingResource.java @@ -11,6 +11,6 @@ public class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { - return "Hello from RESTEasy Reactive"; + return "Hello from Quarkus REST"; } } diff --git a/integration-tests/devtools/src/test/resources/__snapshots__/RESTEasyReactiveCodestartsTest/testContent/src_main_kotlin_ilove_quark_us_GreetingResource.kt b/integration-tests/devtools/src/test/resources/__snapshots__/RESTEasyReactiveCodestartsTest/testContent/src_main_kotlin_ilove_quark_us_GreetingResource.kt index 14985fe82c9f0..0c8347780aba3 100644 --- a/integration-tests/devtools/src/test/resources/__snapshots__/RESTEasyReactiveCodestartsTest/testContent/src_main_kotlin_ilove_quark_us_GreetingResource.kt +++ b/integration-tests/devtools/src/test/resources/__snapshots__/RESTEasyReactiveCodestartsTest/testContent/src_main_kotlin_ilove_quark_us_GreetingResource.kt @@ -10,5 +10,5 @@ class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) - fun hello() = "Hello from RESTEasy Reactive" + fun hello() = "Hello from Quarkus REST" } \ No newline at end of file diff --git a/integration-tests/gradle/src/main/resources/maven-exclusion-in-extension-dependency/src/main/java/org/acme/GreetingResource.java b/integration-tests/gradle/src/main/resources/maven-exclusion-in-extension-dependency/src/main/java/org/acme/GreetingResource.java index 6938062ec8ff7..244f294265375 100644 --- a/integration-tests/gradle/src/main/resources/maven-exclusion-in-extension-dependency/src/main/java/org/acme/GreetingResource.java +++ b/integration-tests/gradle/src/main/resources/maven-exclusion-in-extension-dependency/src/main/java/org/acme/GreetingResource.java @@ -11,6 +11,6 @@ public class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { - return "Hello from RESTEasy Reactive"; + return "Hello from Quarkus REST"; } } diff --git a/integration-tests/gradle/src/main/resources/maven-exclusion-in-extension-dependency/src/test/java/org/acme/GreetingResourceTest.java b/integration-tests/gradle/src/main/resources/maven-exclusion-in-extension-dependency/src/test/java/org/acme/GreetingResourceTest.java index 1e0da3846c90e..458bc12afb6db 100644 --- a/integration-tests/gradle/src/main/resources/maven-exclusion-in-extension-dependency/src/test/java/org/acme/GreetingResourceTest.java +++ b/integration-tests/gradle/src/main/resources/maven-exclusion-in-extension-dependency/src/test/java/org/acme/GreetingResourceTest.java @@ -15,7 +15,7 @@ void testHelloEndpoint() { .when().get("/hello") .then() .statusCode(200) - .body(is("Hello from RESTEasy Reactive")); + .body(is("Hello from Quarkus REST")); } } diff --git a/integration-tests/maven/src/test/java/io/quarkus/maven/it/DevMojoIT.java b/integration-tests/maven/src/test/java/io/quarkus/maven/it/DevMojoIT.java index 7a85f94972362..df8a92b68fafb 100644 --- a/integration-tests/maven/src/test/java/io/quarkus/maven/it/DevMojoIT.java +++ b/integration-tests/maven/src/test/java/io/quarkus/maven/it/DevMojoIT.java @@ -70,7 +70,7 @@ protected ContinuousTestingMavenTestUtils getTestingTestUtils() { public void testFlattenedPomInTargetDir() throws MavenInvocationException, IOException { testDir = initProject("projects/pom-in-target-dir"); run(true); - assertThat(devModeClient.getHttpResponse("/hello")).isEqualTo("Hello from RESTEasy Reactive"); + assertThat(devModeClient.getHttpResponse("/hello")).isEqualTo("Hello from Quarkus REST"); } @Test diff --git a/integration-tests/maven/src/test/resources-filtered/projects/codegen-config-factory/app/src/test/java/org/acme/GreetingResourceTest.java b/integration-tests/maven/src/test/resources-filtered/projects/codegen-config-factory/app/src/test/java/org/acme/GreetingResourceTest.java index 61b623b5f33be..648a9a259465c 100644 --- a/integration-tests/maven/src/test/resources-filtered/projects/codegen-config-factory/app/src/test/java/org/acme/GreetingResourceTest.java +++ b/integration-tests/maven/src/test/resources-filtered/projects/codegen-config-factory/app/src/test/java/org/acme/GreetingResourceTest.java @@ -15,6 +15,6 @@ public void testHelloEndpoint() { .when().get("/hello") .then() .statusCode(200) - .body(is("Hello from RESTEasy Reactive")); + .body(is("Hello from Quarkus REST")); } } \ No newline at end of file diff --git a/integration-tests/maven/src/test/resources-filtered/projects/config-tracking/src/main/java/org/acme/GreetingResource.java b/integration-tests/maven/src/test/resources-filtered/projects/config-tracking/src/main/java/org/acme/GreetingResource.java index 6938062ec8ff7..244f294265375 100644 --- a/integration-tests/maven/src/test/resources-filtered/projects/config-tracking/src/main/java/org/acme/GreetingResource.java +++ b/integration-tests/maven/src/test/resources-filtered/projects/config-tracking/src/main/java/org/acme/GreetingResource.java @@ -11,6 +11,6 @@ public class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { - return "Hello from RESTEasy Reactive"; + return "Hello from Quarkus REST"; } } diff --git a/integration-tests/maven/src/test/resources-filtered/projects/pom-in-target-dir/src/main/java/org/acme/GreetingResource.java b/integration-tests/maven/src/test/resources-filtered/projects/pom-in-target-dir/src/main/java/org/acme/GreetingResource.java index 6938062ec8ff7..244f294265375 100644 --- a/integration-tests/maven/src/test/resources-filtered/projects/pom-in-target-dir/src/main/java/org/acme/GreetingResource.java +++ b/integration-tests/maven/src/test/resources-filtered/projects/pom-in-target-dir/src/main/java/org/acme/GreetingResource.java @@ -11,6 +11,6 @@ public class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { - return "Hello from RESTEasy Reactive"; + return "Hello from Quarkus REST"; } } diff --git a/integration-tests/opentelemetry-quickstart/src/main/java/io/quarkus/it/opentelemetry/GreetingResource.java b/integration-tests/opentelemetry-quickstart/src/main/java/io/quarkus/it/opentelemetry/GreetingResource.java index 3874e37f85302..4054762068913 100644 --- a/integration-tests/opentelemetry-quickstart/src/main/java/io/quarkus/it/opentelemetry/GreetingResource.java +++ b/integration-tests/opentelemetry-quickstart/src/main/java/io/quarkus/it/opentelemetry/GreetingResource.java @@ -11,6 +11,6 @@ public class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { - return "Hello from RESTEasy Reactive"; + return "Hello from Quarkus REST"; } } diff --git a/integration-tests/opentelemetry-quickstart/src/test/java/io/quarkus/it/opentelemetry/OpenTelemetryDisabledTest.java b/integration-tests/opentelemetry-quickstart/src/test/java/io/quarkus/it/opentelemetry/OpenTelemetryDisabledTest.java index 413fd1f41fd60..92a8e66aa8537 100644 --- a/integration-tests/opentelemetry-quickstart/src/test/java/io/quarkus/it/opentelemetry/OpenTelemetryDisabledTest.java +++ b/integration-tests/opentelemetry-quickstart/src/test/java/io/quarkus/it/opentelemetry/OpenTelemetryDisabledTest.java @@ -24,7 +24,7 @@ void buildTimeDisabled() { .when().get("/hello") .then() .statusCode(200) - .body(is("Hello from RESTEasy Reactive")); + .body(is("Hello from Quarkus REST")); // Service will start nevertheless. await().atMost(200, MILLISECONDS).until(() -> getSpans().size() == 0); } diff --git a/integration-tests/opentelemetry-quickstart/src/test/java/io/quarkus/it/opentelemetry/OpenTelemetryTest.java b/integration-tests/opentelemetry-quickstart/src/test/java/io/quarkus/it/opentelemetry/OpenTelemetryTest.java index 51a58984e53c3..e4963ec759d1e 100644 --- a/integration-tests/opentelemetry-quickstart/src/test/java/io/quarkus/it/opentelemetry/OpenTelemetryTest.java +++ b/integration-tests/opentelemetry-quickstart/src/test/java/io/quarkus/it/opentelemetry/OpenTelemetryTest.java @@ -18,7 +18,7 @@ void buildTimeEnabled() { .when().get("/hello") .then() .statusCode(200) - .body(is("Hello from RESTEasy Reactive")); + .body(is("Hello from Quarkus REST")); await().atMost(5, SECONDS).until(() -> getSpans().size() == 1); } }