Given an abstract, generic Resource class and a concrete implementation:
public abstract class AbstractResource<T> {
@Autowired
private SomeService<T> service;
@Path("/{id}")
@GET
public T get(@PathParam("id") String id) {
return service.get(id);
}
}
@Path("/people")
public class PersonResource extends AbstractResource<Person> { }
It appears that when generating the docs for PersonResource
, Enunciate is not picking up the fact that get()
returns a Person
.
Person is not listed in the Data Model > Data Types section.
Under the GET section, Response Body shows the element type as "(custom)".
Are these issues because of the use of generics as the entity types? Is there a way to hint to Enunciate what the real types are so the documentation can be generated correctly?
Is
Person
annotated as@XmlRootElement
? If so, is it included in the same project asPersonResource
? If not, are you importing thePerson
class as described in Enunciate: Multi-Module Projects?