开发者

Are there javadoc-like tools to generate RESTful web service apidoc from JAX-RS annotations? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 8 years ago.

Improve this question

I'm developing a web service with CXF by using JAX-RS annotations on resources. These annotations specify arguments names, default values, and the valid input and output mime types.

It'd be nice to be able to run a javadoc-esque tool on my code to generate a concise set of documentation of this interface, but I cannot seem to find anything.

The docs produced by javadoc itself would require too much trimming down, I really want something that understands the seman开发者_如何学Ctics of the JAX-RS annotations and generates something friendly to the devs who want to use my service.


Take a look at Enunciate. There's a Maven plugin that will generate docs included in the site.


If you are building Restful webservices, the documentation is known as WADL. WADL is basically Rest's version of WSDL. I use Jersey to build my Restful web services. Jersey automatically creates the WADL based on the annotations you have in your resources package. Here's how the sample WADL looks like from Jersey's website: https://java.net/projects/jersey/sources/svn/show/trunk/jersey/samples/generate-wadl

The best part of this is you do absolutely nothing. :) When you change the URI or parameters annotation in your Resource classes, they will be automatically reflected in this documentation.

TADAA! :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜