I have a REST service that produces a JSON output. I’m using Jersey. I can see my WADL in XML format when I type <server>/<rest>application.wadl and I get, for example, the following keys:
<response>
<ns2:representation xmlns:ns2="http://wadl.dev.java.net/2009/02" xmlns="" element="script" mediaType="application/json"/>
</response>
Now I need to describe the json that the service returns. How can I do that?
EDIT: There seems to be a solution here:
http://java.net/jira/browse/JERSEY-638
There is a patch available, but I don’t know how to use this patch. What do I do with the “.patch” file?
The .patch file can be applied using SVN
Apply Patchcommand.The Jersey source code version 1.x can be found here. There is a checkout URL specified. I think that patch was not officially accepted thou you can use it locally, accepting all the risks, probably.