With Quarkus, it is very important to define the @Produces and @Consumes annotations since they are analyzed at build time and Quarkus restricts the number of JAX-RS providers included in the native executable to the minimum required by the application. It allows to reduce the size of the native executable.

Annotate the method or its class with @Produces and @Consumes (if supported by HTTP method) and specify target MIME types.