Re: [Jersey] how to know variable metadata for resource modification

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Tue, 23 Feb 2010 10:18:23 -0500

With Jersey you can get a WADL description of the resource that will include as much metadata as is statically available from the the JAX-RS annotations.


On Feb 23, 2010, at 12:53 AM, Justus Pendleton wrote:

> Apologies if this is too REST-theoretical for the Jersey mailing list,
> Something I have been struggling with for the past few days is how (and where) to represent metadata about a POST (or PATCH) if my application allows run-time configuration of the actual representation of my media types.
> For instance, if I can POST to /forests to create a new Forest I need to know what exactly I should be POSTing. My understanding is that, in an ideal world, clients know a priori what the answer to that question is. Unfortunately, in my legacy application from a non-ideal world administrator's could enable a switch making "property-owner" become a required field. If you POST without it you'll get an error. Clients would like to know that kind of thing without first having to submit a POST but where should they do a GET to discover that?
> GET /forests (Accept: forest.metadata.xml)
> GET /forests-creation-metadata
> GET /forests/creation-metadata
> Any ideas and suggestions, theoretical or practical, on how you'd handle something like this would be appreciated,
> Thanks,
> Justus
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail: