I don't get what's the good thing to include @Produces(MediaType.APPLICATION_JSON) to @Stereotype annotation.
From RESTEASY-1821 reproducer code,  It doesn't simplify thing to annotate @RestService stereotype to SomeRestServce, moreover
it introduces other annotation clash issue as you said. It's better to let Resteasy process @Produce annotation directly instead of
CDI container.  

@Path("/some")
@RestService
public class SomeRestService {
    @GET
    @Path("/")
    public Response getSome() {
        return Response.ok().entity("{\"x\" : 42, \"y\" : \"foo\"}").build();
    }
}

Thanks,
Jim


On 11/01/2018 09:33 PM, Martin Stefanko wrote:
Hi all,

in my issue [1] I am facing a decision whether to include CDI stereotype usage also in JAX-RS annotated methods. The problem is that to allow stereotypes to be picked up by CDI they need to be placed on the producer method or field [2] which means they need to be annotated by javax.enterprise.inject.Produces annotation. This annotation already clashes with JAX-RS javax.ws.rs.Produces and additionally impose problems (ambiguous injection) when several methods with the same return type would use stereotypes (I've created simple example at [3]). This is why I want to ask for the community opinion whether or not should RestEasy support stereotypes on JAX-RS methods.


_______________________________________________
resteasy-dev mailing list
resteasy-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/resteasy-dev