How to get the full path to the REST resource. #47279
Unanswered
skku-daniilkim
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am writing a Quarkus extension that is going to replace the fields annotated with
@FullPath("{FooBar.getFoo}")
with the full path of the specified REST handler at build time. I found that it is possible to useio.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveResourceMethodEntriesBuildItem
that provides a list ofEntry
, where I can get aResourceMethod
and access the method name, and its path, but it does not seem to handle nested subroutes, base url, and class@Path
annotations (in fact, it does not seem like it even returns them), so thisBuildItem
just returns the direct value of the@Path
annotation that is attached to the REST method.Quarkus's built-in "Endpoints" menu that, from the looks of it (
io.quarkus.devui.deployment.menu.EndpointsProcessor
) gets the information during the runtime, and seems to handle the base url and class annotations, but not nested subroutes.
Ultimately, I just want to try and recreate the functionality of the
@RestClient
annotation, and just create the implementation of the provided interface, that uses theHttpClient
underneath to call the REST methods.Therefore, I have been wondering, what is the best way to resolve the full path (excluding the host) of a particular REST method.
Beta Was this translation helpful? Give feedback.
All reactions