question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Partial PathParam doesn't work in RESTEasy Reactive

See original GitHub issue

Describe the bug

Having an endpoint defined as:

@Path("/hello")
public class ReactiveGreetingResource {

    @GET
    @Produces(MediaType.TEXT_PLAIN)
    @Path("/a-{extension}")
    public String hello(@PathParam("extension") String extension) {
        return "->" + extension + "<-";
    }
}

And if a request is done to http://localhost:8080/hello/a-hoy, a 404 is returned

Expected behavior

The following should be returned:

HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
content-length: 7

->hoy<-

Actual behavior

It returns:

HTTP/1.1 404 Not Found
Content-Type: application/json
content-length: 0

How to Reproduce?

  1. Generate a project with RestEasy Reactive: https://code.quarkus.io/?e=resteasy-reactive&extension-search=reac
  2. Add @Path("/a-{extension}") and add a @PathParam to the ReactiveGreetingResource there
  3. Run mvn clean compile quarkus:dev
  4. Go to http://localhost:8080/hello/a-hoy

Output of uname -a or ver

Fedora 35

Output of java -version

JDK 17

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.4.1.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Maven 3.8.2

Additional information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
geoandcommented, Nov 11, 2021

Let me check

1reaction
geoandcommented, Nov 11, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing REST Services with RESTEasy Reactive - Quarkus
This will cause all rest endpoints to be resolve relative to /api , so the endpoint above with @Path("rest") would be accessible at...
Read more >
RESTEasy JAX-RS - JBoss.org
@PathParam is a parameter annotation which allows you to map variable URI path fragments into your method call. @Path("/library") public class Library {...
Read more >
A Guide to RESTEasy - Baeldung
A quick guide to building a REST API using RESTEasy.
Read more >
Learning About Quarkus RESTEasy Reactive and Microprofile ...
I have played with quarkus-resteasy-reactive and ... Here are relative issues which are work in progress if you are interested in:.
Read more >
Access path params from outside the main controller with ...
I'm using Resteasy with Quarkus ( io.quarkus.quarkus-resteasy ). ... The @PathParam annotation is not accepted outside the controller.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found