-
Notifications
You must be signed in to change notification settings - Fork 0
Documentation generation
mekor-dev edited this page Sep 29, 2020
·
1 revision
To generate the API documentation from the javadoc, The project is using the Enunciate lib.
Doc: https://github.com/stoicflame/enunciate
The documentation is generated by Maven, by building with the docs profile
mvn clean compile package -Plocal,docs
The files are generated in src/main/webapp/docs and can be access at http://localhost:8080/rest-quickstart/docs
Complete list: https://github.com/stoicflame/enunciate/wiki/Enunciate-Specific-Annotations
Specify the type of a parameter or the response. Very usefull if the method returns a Response object or has a String parameter.
@GET
@TypeHint(value = User.class)
public Response sayHello() {
return Response.entity("Hello").build();
}Javadoc annotation. Specify the description for a given return code.
/**
* Says "Hello".
*
* @HTTP 200 Says Hello
* @HTTP 500 Something happened
*/