Enunciate uses the JAX-RS spec to generate its documentation. Unfortunately, the Iterable
interface isn't a formally-supported JAX-RS object type, so somehow you're using a custom message body writer to serialize out Iterable
to JSON (Jackson, I presume?).
So if you want to be for formal about your return type, you can create a wrapper bean that Enunciate can recognize and return that instead of Iterable
, e.g.:
@XmlRootElement
public class Projects {
public Collection<Project> projects;
}