users@jersey.java.net

Re: [Jersey] WADL and resource wide params

From: Martin Grotzke <martin.grotzke_at_freiheit.com>
Date: Wed, 04 Feb 2009 03:37:45 +0100

Hi Andrew,

resource wide path params are not (yet) supported out of the box.

You should be able to support them with a custom DocProcessor and a
WadlGenerator:
- your CustomDocProcessor reads a custom javadoc tag like
  @pathparam.selector from your class and adds required information to
  the resourcedoc
- your CustomWadlGenerator reads the stored information from the
  resourcedoc and extends the generated wadl.

You might have a look at the ExampleDocProcessor and
ExampleWadlGenerator from the generate-wadl sample ([1], [2]).

I'll see if can add support for this in the trunk.

Btw, supported javadoc tags and custom tags are documented here [3], if
you haven't seen this.

Cheers,
Martin


[1] https://jersey.dev.java.net/source/browse/*checkout*/jersey/trunk/jersey/samples/generate-wadl/src/main/java/com/sun/jersey/samples/generatewadl/util/ExampleDocProcessor.java
[2] https://jersey.dev.java.net/source/browse/*checkout*/jersey/trunk/jersey/samples/generate-wadl/src/main/java/com/sun/jersey/samples/generatewadl/util/ExampleWadlGenerator.java
[3] http://wikis.sun.com/display/Jersey/SupportedJavadocTagsForExtendedWADL




On Tue, 2009-02-03 at 11:26 -0700, Andrew Ochsner wrote:
> So I have a resource whose path is @Path(/resource/{selector}) When
> i generate wadl, it does insert a resource wide param element. Is
> there any way (via javadoc or some other) to add a description to that
> resource wide parameter?
>
> Andy o
-- 
Martin Grotzke
http://www.javakaffee.de/blog/