FroMage / jax-doclets

Set of JavaDoc doclets for modern Java annotations APIs
http://www.lunatech-labs.com/open-source/jax-doclets
GNU Lesser General Public License v3.0
26 stars 23 forks source link

Support for @ApplicationPath in JAX-RS doclet #47

Open grossws opened 12 years ago

grossws commented 12 years ago

Support JAX-RS paths prefixing set in @ApplicationPath("/rest") annotation.

In code I have something like:

import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;

@ApplicationPath("/rest")
public class RestApp extends Application {
}
import javax.ws.rs.GET;
import javax.ws.rs.Path;

public class RestResource {
  @GET @Path("/resource")
  public String getResource() {
    // ...
  }
}

So all JAX-RS paths are relative to /rest either if I use @Path("/resource") it will be mapped to /rest/resource. So in documentation path should be /rest/resource instead of /resource as it is now.

Maybe it works fine if servlet-mapping is set for javax.ws.rs.core.Application to /rest/*, I haven't tested.

FroMage commented 12 years ago

Not supported yet. If you provide a pull request I'll apply it.