Skip to content

Commit

Permalink
resteasy reactive in legumes
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobat committed Oct 11, 2023
1 parent ab206f2 commit d2bfee0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>3.3.1</quarkus.platform.version>
<quarkus.platform.version>3.4.2</quarkus.platform.version>
<quarkus-micrometer-registry-otlp.version>3.0.1</quarkus-micrometer-registry-otlp.version>
<quarkus-artemis-bom.version>3.0.0</quarkus-artemis-bom.version>
<quarkus-pooled-jms.version>2.2.0</quarkus-pooled-jms.version>
<lombok.version>1.18.26</lombok.version>
<rest-assured.version>5.3.0</rest-assured.version>
<rest-assured.version>5.3.2</rest-assured.version>
<skipITs>true</skipITs>
<surefire-plugin.version>3.0.0</surefire-plugin.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jackson</artifactId>
<artifactId>quarkus-resteasy-reactive-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import com.brunobat.rest.data.LegumeItem;
import com.brunobat.rest.data.LegumeNew;
import jakarta.ws.rs.PathParam;
import org.eclipse.microprofile.openapi.annotations.Operation;
import org.eclipse.microprofile.openapi.annotations.media.Content;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.eclipse.microprofile.openapi.annotations.parameters.Parameter;
import org.eclipse.microprofile.openapi.annotations.parameters.RequestBody;
import org.eclipse.microprofile.openapi.annotations.responses.APIResponse;
import org.jboss.resteasy.annotations.jaxrs.PathParam;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private Optional<LegumeItem> find(final String legumeId) {
.findFirst();
}

private LegumeItem addLegume(final @Valid LegumeNew legumeNew) {
private LegumeItem addLegume(final LegumeNew legumeNew) {
final Legume legumeToAdd = Legume.builder()
.name(legumeNew.getName())
.description((legumeNew.getDescription()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ public class LegumeResourceTest {
public void testProvisionAndList() {
given()
.header("Content-Type", "application/json; encoding=utf8; charset=utf8")
.header("Accept", "application/json; encoding=utf8; charset=utf8")
.when().post("/legumes/init")
.then()
.statusCode(201);

given()
.header("Content-Type", "application/json; encoding=utf8; charset=utf8")
.header("Accept", "application/json; encoding=utf8; charset=utf8")
.when().get("/legumes")
.then()
.log().all()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ quarkus.log.console.format=%d{HH:mm:ss} %-5p traceId=%X{traceId}, parentId=%X{pa
#quarkus.otel.bsp.max.export.batch.size=64
#quarkus.otel.bsp.schedule.delay=500ms
otel.metrics.exporter=none
quarkus.otel.traces.sampler=traceidratio
quarkus.otel.traces.sampler.arg=0.1

# Configures the Artemis properties.
quarkus.artemis.url=tcp://localhost:61616
Expand Down

0 comments on commit d2bfee0

Please sign in to comment.