You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is a according to the spec or a bug.
If @Path on a class (TestSubApi) overlaps the combination of @Path on class and @Path on a method of another class (TestApi), the method of the second class (TestApi) isn't reachable.
Paths: on class + on method
TestApi: /test + /{name} -> not reachable (404)
TestSubApi: /test/{name}/ + config -> works
Expected behavior
As the path don't overlap all methods/paths should be reachable.
Actual behavior
No response
How to Reproduce?
Run this service:
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Response;
@ApplicationScoped
@Path("/test")
public class TestApi {
@Path("/{name}")
@GET
public Response getName(String name) {
return Response.ok().entity(name).build();
}
}
@ApplicationScoped
@Path("/test/{name}")
class TestSubApi {
@Path("/config")
@GET
public Response getConfig(String name) {
return Response.ok().entity("Config of " + name).build();
}
}
/test/{name} can't be called and returns a 404. /test/{name}/config works
Output of uname -a or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.2.0.Final
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
If all the code is in one class with a common @Path everything works.
If both classes use @Path("/") and the full path on the methods it works as well.
As the code in my project that is broken is generated, it's a bit laborious to change the paths.
The text was updated successfully, but these errors were encountered:
Describe the bug
Not sure if this is a according to the spec or a bug.
If
@Path
on a class (TestSubApi) overlaps the combination of@Path
on class and@Path
on a method of another class (TestApi), the method of the second class (TestApi) isn't reachable.Paths: on class + on method
Expected behavior
As the path don't overlap all methods/paths should be reachable.
Actual behavior
No response
How to Reproduce?
Run this service:
/test/{name}
can't be called and returns a 404./test/{name}/config
worksOutput of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.2.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
If all the code is in one class with a common
@Path
everything works.If both classes use
@Path("/")
and the full path on the methods it works as well.As the code in my project that is broken is generated, it's a bit laborious to change the paths.
The text was updated successfully, but these errors were encountered: