[ https://issues.apache.org/jira/browse/CXF-7403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Romain Manni-Bucau updated CXF-7403: ------------------------------------ Description: Idea is to be able to produce a @Provider (MessageBody[Reader|Writer) and override on the fly the @Consumes/@Produces of the class using the ones on the producer method (field? - in the annotated type of the producer). A sample would be: {code} javax...Produces @Produces("application/json") @Consumes("application/json") public JacksonProvider jsonProvider() { return new JacksonProvider(); } {code} This sample would allow to override in the application conflicting/broken media types (jackson uses wildcard by default leading to issues in JAX-RS 2 sorting when another provider uses application/*+json or so). was: Idea is to be able to produce a @Provider (MessageBody[Reader|Writer) and override on the fly the @Consumes/@Produces of the class using the ones on the producer method (field? - in the annotated type of the producer). A sample would be: {code} javax...Produces @Produces("application/json") @Consumes("application/json") public JacksonProvider jsonProvider() { return new JacksonProvider(); } {code} This sample would allow to override in the application conflicting/broken media types (jackson uses */* by default leading to issues in JAX-RS 2 sorting). > [CDI] support overriding of consumes/produces for producers > ----------------------------------------------------------- > > Key: CXF-7403 > URL: https://issues.apache.org/jira/browse/CXF-7403 > Project: CXF > Issue Type: New Feature > Reporter: Romain Manni-Bucau > > Idea is to be able to produce a @Provider (MessageBody[Reader|Writer) and > override on the fly the @Consumes/@Produces of the class using the ones on > the producer method (field? - in the annotated type of the producer). > A sample would be: > {code} > javax...Produces > @Produces("application/json") > @Consumes("application/json") > public JacksonProvider jsonProvider() { > return new JacksonProvider(); > } > {code} > This sample would allow to override in the application conflicting/broken > media types (jackson uses wildcard by default leading to issues in JAX-RS 2 > sorting when another provider uses application/*+json or so). -- This message was sent by Atlassian JIRA (v6.3.15#6346)