APIDoclet is a Javadoc doclet for Java Web APIs. Aim of this project is to be able to generate user-friendly API documentation with ease. PDF and HTML outputs are supported.
Documentation is generated using Javadoc documentation and annotations. Thus standard Java documentation format is enough. Although there are some extra useful Javadoc tags:
- @module <string> Entitle class with a module name
- @ignore Do not include this class to documentation
- @requestExample <string> Provide an example request format for method
- @responseExample <string> Provide an example return format for method
- @name <string> Provide an alternative name for method
- @ignore Do not include this method to documentation
For now, only Spring MVC 3+ is supported. Supported annotations are:
- org.springframework.web.bind.annotation.PathVariable
- org.springframework.web.bind.annotation.RequestParam
Documentation requirements differ from project to project. Hence output must be configurable and flexible. APIDoclet can generate output in PDF and HTML formats. A template file must be provided for this purpose. Documentation is generated using Freemarker, Flying Saucer and iText. Template must be in Freemarker format.
javadoc -output test.pdf -template templates/test.ftl [-resources <resource_folder>] -doclet APIDoclet ...
You can also use APIDoclet in Maven! Please check example project for details.
For more details on using doclets, please check Doclet overview page