hey there,
I am trying to use the wadl extensions to document my restlet api, but I'm
ending up with some weird results. Here's why:
several parts of my api look something like this:
/object
/object/{objectid}
and I use the same serverresource to handle both of them:
router.attach( "/object", ObjectResource.class );
router.attach( "/object/{objectid}", ObjectResource.class );
ObjectResource then handles the calls differently based on the presence/absence
of the objectid attribute, but I don't see a way to document such behavior. In
the docs, I end up with two entries, one for /object and one for
/object/{objectid} that are both identical, and I don't see a way to
distinguish in my describe* type calls. Is there some way around this? The only
thing I can think of is to refactor my code to
ObjectResource -- which handles and documents /object
ObjectWithIdResource -- which handles and documents /object/{objectid}
ObjectResourceHelper -- which does the work
But this goes contrary to keeping the documentation close to the code.
Am I missing something?
thanks,
bjorn
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2920673