Monday, November 10, 2025

Getting "PathParameterMissingException" with domino-rest? Are formats like "{uid:[0-9]+}" not supported?

Hello all, for domino-rest, are formats like {uid:[0-9]+} not supported? Am I doing something else wrong again in my attempt to migrate off of resty-gwt/gwt-jackson? Is this a lost cause and I should just reverse course?

My jakarta jersey rest endpoint is defined as:

@Consumes(MediaType.APPLICATION_JSON)  @Produces(MediaType.APPLICATION_JSON)  @Path("/1.0")  public interface UserV1Jakarta {      @Path("/entitlements/modules/{uid:[0-9]+}")      @GET      EntitlementsModulesResponse entitlementsModules(@PathParam("uid") String uid, //                                                      @HeaderParam(HeaderConsts.TOKEN) String token);  //other methods snipped.  }  

I am using the following for the gwt side implementation:

// ...  import org.dominokit.rest.shared.request.service.annotations.RequestFactory;    @RequestFactory(serviceRoot = ApplicationPaths.API_CONTEXT + ApplicationPaths.BUTTER_USER)  public interface UserV1 extends UserV1Jakarta {    }  

I'm calling it as follows:

  Console console = DomGlobal.console;  UserV1Factory userV1 = UserV1Factory.INSTANCE;  DominoRestConfig config = DominoRestConfig.getInstance();  console.log("DominoRestConfig initialized");  userV1.entitlementsModules("0", "not-used").onSuccess(m->{      console.log("Got entitlements modules");      m.result.forEach(System.out::println);  }).onFailed(e->{      console.log("Failed to get modules");      console.log(e.getHeaders());      console.log(e.getBody());      console.log(e.getStatusText());      console.log(e.getThrowable());  }).send();  

And I'm getting in the JS console (superdev mode so I can see any exceptions):

Could not RunAsync request [com.newsrx.butter.client.domino.api.UserV1Factory$UserV1_entitlementsModules@3] ConsoleLogger.java:33:1  Exception: org.dominokit.rest.shared.request.exception.PathParameterMissingException: No parameter provided for path [{uid:[0-9]+}] ConsoleLogger.java:55:1  

-Mike

No comments:

Post a Comment