1

I currently have a problem similar to this but in quarkus-resteasy. I have looked around and I cannot find a way to order the paths. The endpoint for getAllNotifications() is never selected, all requests go to getModel():

@Get
@Path("/cars/{brand}/{model}")
@Produces(MediaType.APPLICATION_JSON)
public Response getModel(@PathParam("brand") String brand, @PathParam("model") String model) {
  ...
}

@Get
@Path("/cars/notification/all")
@Produces(MediaType.APPLICATION_JSON)
public Response getAllNotifications() {
  ...
}

Is there a way to prioritize either endpoint 1 or 2 like it was done here

FourtyTwo
  • 734
  • 8
  • 19
  • 1
    According to https://stackoverflow.com/questions/30690946/jax-rs-overloading-methods-paths-order-of-execution this should not happen, the second one should have precedence over the first one. – luk2302 Mar 16 '21 at 08:33
  • @luk2302 thank you the update. I have updated the question to match my exact problem. I had a look at your link and looks like it should not happen but it is. These endpoints were working correctly in payara-micro. The problem started after the migration to quarkus. – FourtyTwo Mar 16 '21 at 09:25
  • This indeed should not happen. If it does, please open an issue in the Quarkus Github repo – geoand Mar 16 '21 at 11:01

0 Answers0