Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Micro Profile ReST client does not support JAX-RS @Path annotation containing Regexp #4348

Closed
jmdsc opened this issue Dec 15, 2019 · 0 comments

Comments

@jmdsc
Copy link

jmdsc commented Dec 15, 2019

An API defined with JAX-RS annotations has been provided to us that looks similar to the following:

@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@Path("abc/{abcId}/xyz")
public interface SomeResource {

    @PUT
    @Path("{xyzId: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}}")
    Response update(@PathParam("xyzId") UUID xyzId);
}

When using org.glassfish.jersey.ext.microprofile:jersey-mp-rest-client:2.29.1

RestClientBuilder
    .newBuilder()
    .baseUri(baseUri)
    .build(SomeResource.class);

the following exception is thrown:

org.eclipse.microprofile.rest.client.RestClientDefinitionException: Parameter name xyzId on package.SomeResource::update doesn't match any @ Path variable name.
at org.glassfish.jersey.microprofile.restclient.MethodModel$Builder.validateParameters(MethodModel.java:659)
at org.glassfish.jersey.microprofile.restclient.MethodModel$Builder.build(MethodModel.java:622)
at org.glassfish.jersey.microprofile.restclient.MethodModel.from(MethodModel.java:106)
at org.glassfish.jersey.microprofile.restclient.RestClientModel.parseMethodModels(RestClientModel.java:113)
at org.glassfish.jersey.microprofile.restclient.RestClientModel.from(RestClientModel.java:70)
at org.glassfish.jersey.microprofile.restclient.RestClientBuilderImpl.build(RestClientBuilderImpl.java:187)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants