users@jersey.java.net

Re: Documentation of resource via javadoc or annotations [WAS: Re: [wikis.sun.com] Jersey > WADL]

From: Christopher Piggott <cpiggott_at_gmail.com>
Date: Thu, 5 Mar 2009 07:58:33 -0500

Hi,

Martin Grotzke wrote:
>When I started with extended wadl I also thought about this
>and decided not to mix up runtime/application logic with
>information that is only relevant for documentation

That crossed my mind, but isn't there a case where it would be useful
to know at run-time? Suppose for instance a client asks for something
as an application/something+xml but I can't fullfill the request.
Instead, I am going to return say an HTTP 500, and an object that's
actually an application/some_error+xml. Would there be any advantage
to the runtime knowing that I intend to do this?

--Chris