Hi Alessio,
thanks a lot for your reply. Yes, I saw the ResourceBuilder class and it
looks quite interesting. But is there some kind of SPI which allows me to
alter the resource model that RESTEasy creates for the discovered
resources? Something like:
public interface ResourceModelPostProcessorPlugin {
void process( ResourceClassBuilder builder );
}
Best regards
Christian Kaltepoth
2017-09-19 0:30 GMT+02:00 Alessio Soldano <asoldano(a)redhat.com>:
Hi Christian,
sorry for the late reply, been on PTO for a couple of weeks.
Have you checked
https://github.com/resteasy/Resteasy/blob/master/
testsuite/unit-tests/src/test/java/org/jboss/resteasy/test/
resource/ProgammaticTest.java#L59 ? (produces(..) method). Is that what
you're looking for?
Cheers
Alessio
On Fri, Sep 8, 2017 at 5:47 PM, Christian Kaltepoth <
christian(a)kaltepoth.de> wrote:
> Hi,
>
> My name is Christian Kaltepoth and I'm specification lead of JSR 371 (MVC
> 1.0). As you may know, JSR 371 is about creating an action-based web
> framework on top of JAX-RS.
>
> The reference implementation of JSR 371 was previously only targeted to
> support Jersey. But we want to change that. Therefore, we are currently
> looking for ways to integrate with other JAX-RS implementations.
> Unfortunately there are certain features which cannot be implemented using
> the plain JAX-RS API. That's why we are also looking into using JAX-RS
> implementation specific SPIs.
>
> One thing we are currently working on is the following requirement: MVC
> controllers (which are just special CDI-based JAX-RS resources) should be
> treated as if they are annotated with @Produces("text/html) without the
> need to add the annotation manually. The current draft of the specification
> states:
>
> *The semantics of controller methods differ slightly from JAX-RS resource
>> methods; [...] Moreover, the default media type for a response is assumed
>> to be text/html , but otherwise can be declared using @Produces just like
>> in JAX-RS.*
>
>
> Jersey provides a special SPI which allows us to hook into the metadata
> for JAX-RS resources:
>
>
https://github.com/jersey/jersey/blob/master/core-server/src
> /main/java/org/glassfish/jersey/server/model/ModelProcessor.java#L75
>
> Is there anything like that in RESTEasy? I looked into the code but
> unfortunately didn't find anything like that.
>
>
> Christian
>
>
> --
> Christian Kaltepoth
> Blog:
http://blog.kaltepoth.de/
> Twitter:
http://twitter.com/chkal
> GitHub:
https://github.com/chkal
>
>
> _______________________________________________
> resteasy-dev mailing list
> resteasy-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/resteasy-dev
>
>