snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Vert.x JsonObject in RESTEasy Reactive response has extra nesting level #251

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 3 years ago

Describe the bug When RESTEasy Reactive plugin should convert Vert.x JsonObject into application/json response, it produces extra nesting level with key "map". This occurs either with quarkus-resteasy-reactive-jackson or with quarkus-resteasy-reactive-jsonb extention. But with simple RESTEasy as well as Reactive routes approach response is {"key":"value"} as expected.

Expected behavior It is expected that response is just

{"key":"value"}

Actual behavior Response body is

{"empty":false,"map":{"key":"value"}}

To Reproduce

Simple reproducer

Steps to reproduce the behavior:

  1. Include quarkus-resteasy-reactive-jackson or quarkus-resteasy-reactive-jsonb extention dependency into pom.xml (or create project template at code.quarkus.io with extentions: RESTEasy Reactive, RESTEasy Reactive JSON-B, RESTEasy Reactive Jackson),
  2. Create an JAX-RS resource class (@Path("/hello"), with method annotated @GET @Path("{ami}") @Produces(MediaType.APPLICATION_JSON) ,
  3. Method signature: public JsonObject helloAmi(@RestPath String ami) ,
  4. And body: return new JsonObject().put("ami", ami);
  5. In terminal run command: curl "http://localhost:8080/hello/john" -w "\n".

Configuration

# Add your application.properties here, if applicable.

Screenshots (If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

Additional context (Add any other context about the problem here.)


https://github.com/quarkusio/quarkus/issues/14668


$upstream:14668$