Description
I'm using jaxrs-spec
generator with library=quarkus
which is the best generator I have found for Quarkus (compared to jaxrs-resteasy
and https://github.com/quarkiverse/quarkus-openapi-generator). However, I can't find the proper way to generate Api methods to specify a status code.
When I use the option returnResponse=true
, it generates this kind of method signature (the implementation should return code 201 for CREATED:
@POST
@Produces({ "application/json" })
Response create();
Unfortunatly jakarta.ws.rs.core.Response
is not generic, and allows returning any type, which prevents an API-first approach.
Without this option, we are not able to specify the CREATED status code.
It would be great to generate the return type org.jboss.resteasy.reactive.RestResponse
instead, as documented here, either by modifying the actual behavior, or with a new option useJbossResponse
).
This feature is somehow related to #21360, but the approach is more generic.
I can help with a PR ;-)