users@jersey.java.net

[Jersey] Re: Any Facility for Generating API Documentation for End Users?

From: ljnelson <ljnelson_at_gmail.com>
Date: Fri, 14 Jan 2011 09:40:46 -0800 (PST)

You could use Enunciate. I tried to send this earlier but the mailing
system ate it; hopefully this won't come through as a duplicate.

http://enunciate.codehaus.org/getting_started.html

Best,
Laird

On Thu, Jan 13, 2011 at 11:56 AM, Tim McNerney [via Jersey] <
ml-node+5918931-1664249810-158506_at_n2.nabble.com<ml-node%2B5918931-1664249810-158506_at_n2.nabble.com>
> wrote:

> I've been rolling my own API documentation on a wiki for an app, but
> realized that most (though not all) of the info that I wanted in that
> document already existed in the application WADL combined with the javadoc.
> So I was wondering if anyone had put together a javadoc like system that
> would generate an API Doc for JAX-RS services? It seems like something which
> would already exist.
>
> So if you had a class that looked like:
>
> @Path("/containers")
> @Produces("application/xml")
> public class ContainersResource {
>
> /**
> * Get a container identified by name.
> *
> * @param container name of the container
> * @return instance of the container if it exists
> */
> @Path("{containername}")
> public Container getContainer(@PathParam("containername") String
> container) {
> return containerService.findByName(container);
> }
>
> /**
> * Return a list of containers matching the given status. Return no
> more than max entries with an offset of
> * start using the standard sorting.
> *
> * @param status empty, full, unknown
> * @param start offset into the list
> * @param max max number of containers returned
> * @return a container list
> */
> @GET
> public Containers getContainers(@QueryParam("status")
> @DefaultValue("empty") String status,
> @QueryParam("start") @DefaultValue("0")
> int start,
> @QueryParam("max") @DefaultValue("10")
> int max) {
> return containerService.findByStatus(start, max, status);
> }
> }
>
> You might generate:
>
> + /baskets
> - /containers
> DESCRIPTION: Return a list of containers matching the given
> status. Return no more than max entries with an offset of start using the
> standard sorting.
> RETURNS: [application/xml] a container list
> PARAMS:
> * status - [String/"empty"] - empty, full, unknown
> * start - [int/0] - offset into the list
> * max - [int/10] - max number of containers returned
> - /<containername>
> DESCRIPTION: Get a container identified by name.
> RETURNS: [application/xml] instance of the container if it exists
>
> VALS:
> * containername - [String] - name of the container
> + /hutch
>
> Apologies for the ASCII interface, but I'm sure you've all seen enough REST
> API Docs to imagine what you'd end up with.
>
> Anyway, curious if Jersey, some Jersey related addon or some other JAX-RS
> implementation supports this type feature and if not, whether you'd be
> amenable to me adding it to the Jira list.
>
> Thanks.
>
> --Tim
>
> ------------------------------
> View message @
> http://jersey.576304.n2.nabble.com/Any-Facility-for-Generating-API-Documentation-for-End-Users-tp5918931p5918931.html
> To start a new topic under Jersey, email
> ml-node+576304-1218448111-158506_at_n2.nabble.com<ml-node%2B576304-1218448111-158506_at_n2.nabble.com>
> To unsubscribe from Jersey, click here<http://jersey.576304.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=576304&code=bGpuZWxzb25AZ21haWwuY29tfDU3NjMwNHw4OTk4MzY1OTI=>.
>
>

-- 
View this message in context: http://jersey.576304.n2.nabble.com/Any-Facility-for-Generating-API-Documentation-for-End-Users-tp5918931p5922674.html
Sent from the Jersey mailing list archive at Nabble.com.