I’m trying to use enunciate to regenerate documentation for my Jersey-based REST API. Hitting a few stumbling blocks:
@GET
@Produces(MediaType.APPLICATION_JSON)
public Iterable<Project> listAll() {
...
}
Enunciate doesn’t seem to be able to interpolate the Iterable. In my docs I just get “element: (custom)”. Note that the Project type is annotated with @XmlRootElement and @JsonRootType.
Similarly, for this code:
@POST
@Consumes(MediaType.APPLICATION_JSON)
public Response save(final T persistable) {
...
}
I get “element: (custom)” for both the method parameter (note: T has an extends restriction) as well as the return type (where Response is: javax.ws.rs.core.Response). Moreover, enunciate can’t seem to figure out the Media Type of the return: it lists XML, JSON, and * (come to think of it, I’m not sure exactly what I would want there, but I know it’s not that.)
Any ideas?