Given an abstract common resource class and specific 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 seems that when creating documents for PersonResourceEnunciate, the fact that it get()returns does not pick up Person.
The person is not listed in the Data Model> Data Types section.
In the GET section, the Response body shows the element type as "(custom)".
Are these problems due to the use of generics as entity types? Is there a way to hint to determine what the real types are so that the documentation can be generated correctly?

source
share