users@jersey.java.net

Re: [Jersey] documentation of service

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 01 Apr 2009 11:48:55 +0200

On Apr 1, 2009, at 10:41 AM, James Strachan wrote:

> BTW I struggled with xml-maven-plugin et al - so I hacked up a little
> maven plugin that just applies the WADL XSLT which is gonna be in the
> same little OSS project too if folks are interested...
>

Very nice! Looking forward to seeing this.

I have investigated some more around issue 223 and did try to come up
with a generic solution but could not make it fit nicely for an
extensible solution (although i admit i did not spend a huge amount of
think time on it).

Perhaps this type of functionality really does need to be a separate
project/module? i think i would be more comfortable with that rather
than embedding it within the server module.

Paul.





> 2009/4/1 James Strachan <james.strachan_at_gmail.com>:
>> 2009/4/1 tarjei <tarjei_at_nu.no>:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Hi,
>>> Felipe Gaścho wrote:
>>>> almost worked: :http://fgaucho.dyndns.org:8080/footprint-service/application.wadl?format=html
>>>>
>>>> On Tue, Mar 31, 2009 at 8:37 PM, Arul Dhesiaseelan <arul_at_fluxcorp.com
>>>> > wrote:
>>>>> You could try using xml-maven-plugin for transformation, if you
>>>>> are using
>>>>> maven.
>>>>>
>>>>> Or, you could also look at this blog entry[1] which uses a
>>>>> servlet filter to
>>>>> do this.
>>>
>>> Way cool :)
>>>
>>> Would it be possible to for Jersey to include a basic resource
>>> that did
>>> this, so that to get generated documentation for a jersey service
>>> all
>>> you had to do was:
>>>
>>> @Path("/")
>>> @Service("root")
>>> class MyRootResource {
>>> ...
>>> @Path("/doc")
>>> Resource getDocs() {
>>> return new JerseyDocumentationResource();
>>> }
>>> }
>>
>> See this thread for background...
>> http://n2.nabble.com/-PATCH--to-allow-the-API-of-RESTful-services-to-be-rendered-using--hierarchial-Implicit-Views-td2353447.html#a2353485
>>
>> Its now pretty easy to do this yourself.
>>
>> FWIW I've a little OSS project that will be public by the end of the
>> month which can add support for a nice HTML hierarchical view of the
>> WADL documentation (i.e. a couple of resource beans, some JSP files
>> and a couple of JSP custom tags) that its very easy to just add as a
>> dependency in your pom.xml to get this feature. Or you can just cut n
>> paste the code if you're not using maven :).
>>
>> I'm using this on a number of projects now - but wanted to minimise
>> cut and paste so I've popped the code into a little OSS project. I'll
>> ping the list as soon as the little site is up...
>>
>> --
>> James
>> -------
>> http://macstrac.blogspot.com/
>>
>> Open Source Integration
>> http://fusesource.com/
>>
>
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://fusesource.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>