I'm developing a web service with CXF by using JAX-RS annotations on resources. These annotations specify arguments names, default values, and the valid input and output mime types.
It'd be nice to be able to run a javadoc-esque tool on my code to generate a concise set of documentation of this interface, but I cannot seem to find anything.
The docs produced by javadoc itself would require too much trimming down, I really want something that understands the semantics of the JAX-RS annotations and generates something friendly to the devs who want to use my service.
Take a look at Enunciate. There's a Maven plugin that will generate docs included in the site.
If you are building Restful webservices, the documentation is known as WADL. WADL is basically Rest's version of WSDL. I use Jersey to build my Restful web services. Jersey automatically creates the WADL based on the annotations you have in your resources package. Here's how the sample WADL looks like from Jersey's website: https://java.net/projects/jersey/sources/svn/show/trunk/jersey/samples/generate-wadl
The best part of this is you do absolutely nothing. :) When you change the URI or parameters annotation in your Resource
classes, they will be automatically reflected in this documentation.
TADAA! :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With