Saturday, 10 September 2016

Textual description of firstImageUrl

How to Create Documentation of JAX-RS Web Services

In this post i will describe how to create a html document from you rest jersey class , which can be used by web sevices consumers easily .

First you need to install raml-for-jax-rs plugin in your eclipse or anypoint studio .

Once you start it properly , and go to your rest service JAX-RS class , and right click on it , you should be able to see "Generate raml for class" option . You click on it and provide name and location of your generated raml file .

Now you have your generated automatically by this awesome plugin , you need to convert it to html document . For that , you have to install raml to html plugin which is written in node.js . install this plugin and go to the location where you have generated the raml file .Now you have to just use following command :
raml2html RestServices.raml -o doc.html
Now your rest class is converted in good looking one page html document which you can expose on your web server .