I was looking for a javadoc-like REST API documentation tool. I already documented my rest controllers in javadoc and I think it would be nice to just create an api documentation from it for the front-end developers.
I think there isn't a tool, yet. So does someone have ideas how to accomplish this task? I thought about using the classic javadoc tool and add some spring / rest specific logic. But I'm not sure yet if I also need some special markup or what could be pitfalls. In the end I'd like to have some tool that can be integrated into the maven site lifecycle but that shouldn't be hard to accomplish.
It may be difficult to handle inheritance: I use it a lot across REST resources but for the reader, inheritance is nothing she should care about. So sub-controllers must somehow integrate the super controllers methods but also be able to create some meaningful documentation in the context of the actual controller. I'm not sure if spring allows me to overwrite methods from super controllers but still evaluates its annotations.
I'd appreciate any hints on related projects, tools that already exists or just your experience with the javadoc-tool!
Fortunately, all modern versions of the JDK provide the Javadoc tool – for generating API documentation from comments present in the source code.
JavaDoc tool is a document generator tool in Java programming language for generating standard documentation in HTML format. It generates API documentation. It parses the declarations ad documentation in a set of source file describing classes, methods, constructors, and fields.
Javadoc is a documentation tool which defines a standard format for such comments, and which can generate HTML files to view the documentation from a web broswer. (As an example, see Oracle's Javadoc documentation for the Java libraries at http://download.oracle.com/javase/6/docs/api/.)
From the main menu, select Tools | Generate JavaDoc. In the dialog that opens, select a scope — a set of files or directories for which you want to generate the reference, and set the output directory where the generated documentation will be placed.
You should look at RESTdoclet. http://ig-group.github.com/RESTdoclet/
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