23 Oct 2013

Document your RESTful API with Cocoon 3

Written by ilgrosso

There are lots of ways of documenting RESTful APIs in Java: just google a bit and you will find the nice Enunciate and Swagger, for example. Such approachs, however, are often quite invasive and hardly customizable.

Many providers - like as Apache CXF - are able to dynamically generate a WADL representation out of JAX-RS annotated classes: such XML representation can be easily put into an XSLT transformation in order to obtain some end-user REST documentation.

I have developed a sample Servlet project for this purpose, featuring some cool technologies like as Apache Cocoon 3, jQuery and highligh.js.

You can take a look at the final result, applied to Apache Syncope.


« Return