Search code examples
resteasywadlenunciate

Has anyone used Enunciate to generate WADL for a RestEasy service?


There are two similar questions asked here and here but no adequate answers are given.

I found that I can use Enunciate to create WADL for a RestEasy service. So I tried it.

In one of my services I have a method mapped to HTTP GET which I am using like below

...
import org.jboss.resteasy.annotations.Form;
...
@GET
@Produces({MediaType.APPLICATION_JSON})
@Transactional(readOnly = true)
public WebServicePageResponse<D> find(@Form WebServicePageRequest<E> wsPageRequest)
{
    ...
}

Enunciate performs a validation on the service methods before it generates the WADL, and throws this error and fails

"A resource method that is mapped to HTTP GET must not specify an entity parameter."

@Form is a RestEasy specific annotation, while Enunciate can only parse JSR-311 annotations.

Has anyone done something similar? Has anyone successfully used Enunciate to generate documentation for a RestEasy service? Are there any alternatives?


Solution

  • The best solution I found to this was to remove @Form annotation and use the individual annotations instead (enter link description hereatleast till Enunciate start supporting this).