9 messages in net.java.dev.jersey.usersRe: [Jersey] [PATCH] to allow the API...
FromSent OnAttachments
James StrachanFeb 19, 2009 7:03 am 
Paul SandozFeb 19, 2009 7:13 am 
James StrachanFeb 19, 2009 7:41 am 
Paul SandozFeb 20, 2009 6:01 am 
James StrachanFeb 20, 2009 6:38 am 
Paul SandozFeb 20, 2009 8:40 am 
Paul SandozFeb 24, 2009 2:53 am 
James StrachanFeb 24, 2009 10:18 am 
Paul SandozFeb 25, 2009 12:03 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [Jersey] [PATCH] to allow the API of RESTful services to be rendered using hierarchial Implicit ViewsActions...
From:James Strachan (jame@gmail.com)
Date:Feb 19, 2009 7:41:49 am
List:net.java.dev.jersey.users

2009/2/19 Paul Sandoz <Paul@sun.com>:

Hi James,

This looks really interesting! thanks for doing this.

No worries - it was fun! I was surprised how easy it was to reuse the WadlResource in an implicit view with really minor changes to Jersey!

I am going to take a close look at this tomorrow. My first thought is we should move the Jersey WadlResource class to the API and we document it in relation to views.

Yeah - it seems a very handy class and something I can imagine lots of folks tinkering with to get better self-documenting RESTful services.

Incidentally I just attached a slightly modified patch; I found that there's a small discrepency between WADL's idea of child resources and JAX-RS path navigation. Namely that JAX-RS navigates a new path by splitting on "/" so "foo/{bar}" would be 2 paths - whereas in WADL documents "foo/{bar}" is often one path - so to work around this I've introduced a simple PartialResource class which matches the "foo" part so that when "{bar}" is navigated to it correctly finds the "foo/{bar}" resource in WADL etc.

e.g. this URL now works in the Camel example... http://localhost:8080/api/resources/endpoints/{id}/messages/{id}

as "messages/{id}" is a single child resource of {id} if you see what I mean.

-- James

------- http://macstrac.blogspot.com/

Open Source Integration http://fusesource.com/