dev@jersey.java.net

RE: [Jersey] Jersey, annotations, and WADL

From: Isak Jonsson <isak_at_vidispine.com>
Date: Tue, 13 Apr 2010 00:55:50 -0700

Another thing. The creation of subresources through the use of AbstractSubResourceLocators appears a bit hidden for me, as a developer?

Assume I have root resources A and B, both with methods returning subresource C (let's call them fromAtoC() and fromBtoC()). My goal is to achieve:

<resource path="A">
   <resource path="C">
      <doc>This resource was obtained through A.fromAtoC()</doc>
      ...
   </resource>
</resource>
<resource path="B">
   <resource path="C">
      <doc>This resource was obtained through B.fromAtoC()</doc>
      ...
   </resource>
</resource>

Any hints on how to get that information? Or is C the same Resource in both cases?

/Isak


> -----Original Message-----
> From: Marc Hadley [mailto:marc.hadley_at_oracle.com]
> Sent: den 8 april 2010 14:33
> To: dev_at_jersey.dev.java.net
> Subject: Re: [Jersey] Jersey, annotations, and WADL
>
> Could you add an issue so we can keep track of this. I'm looking into
> the WADL generation aspect at the moment and will look into this issue.
>
> Marc.
>
> On Apr 8, 2010, at 5:13 AM, Isak Jonsson wrote:
>
> > Hello, small suggestion to IntrospectorModeller.java.
> >
> > Let's assume I have a resource
> >
> > @Path("somepath")
> > public class MyResource {
> > @GET
> > public String myMethod(@MyAnnotation String parameter) { ... } }
> > }
> >
> > Here, @MyAnnotation messes up the Parameter generated by
> IntrospectorModeller, so that the resulting WADL is "broken", or
> rather, less usable. Maybe there should be a way to have
> IntrospectorModeller to ignore this annotation?
> >
> > Cheers,
> >
> > /Isak