-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Sub-Sub resources not supported in reactive rest client #22055
Comments
Also cc @Sgitario in case this is something you would like to look into |
+1 |
I've been looking into fixing this issue and at the moment and current solution does not support clients hierarchy as it's based on constructors which are not accessible from sub sub resources. |
Allow to use sub resources in client resources: Usage for first level: ```java @path("/path") @RegisterRestClient(baseUri = "http://localhost:8081") @consumes("text/plain") @produces("text/plain") public interface RootResource { @path("/sub") SubClient sub(); } ``` Second level: ``` @consumes("text/plain") @produces("text/plain") interface SubClient { @path("/sub") SubSubClient sub(); } ``` Third and N levels (this was unsupported and now it's supported): ``` @consumes("text/plain") @produces("text/plain") interface SubSubClient { @get @path("/simple") String simpleGet(); } ``` Fix quarkusio#22055
@michalszynkiewicz finally I found a solution which works fine and requires only a few changes. |
Allow to use sub resources in client resources: Usage for first level: ```java @path("/path") @RegisterRestClient(baseUri = "http://localhost:8081") @consumes("text/plain") @produces("text/plain") public interface RootResource { @path("/sub") SubClient sub(); } ``` Second level: ``` @consumes("text/plain") @produces("text/plain") interface SubClient { @path("/sub") SubSubClient sub(); } ``` Third and N levels (this was unsupported and now it's supported): ``` @consumes("text/plain") @produces("text/plain") interface SubSubClient { @get @path("/simple") String simpleGet(); } ``` Fix quarkusio#22055
Allow to use sub resources in client resources: Usage for first level: ```java @path("/path") @RegisterRestClient(baseUri = "http://localhost:8081") @consumes("text/plain") @produces("text/plain") public interface RootResource { @path("/sub") SubClient sub(); } ``` Second level: ``` @consumes("text/plain") @produces("text/plain") interface SubClient { @path("/sub") SubSubClient sub(); } ``` Third and N levels (this was unsupported and now it's supported): ``` @consumes("text/plain") @produces("text/plain") interface SubSubClient { @get @path("/simple") String simpleGet(); } ``` Fix quarkusio#22055
Allow to use sub resources in client resources: Usage for first level: ```java @path("/path") @RegisterRestClient(baseUri = "http://localhost:8081") @consumes("text/plain") @produces("text/plain") public interface RootResource { @path("/sub") SubClient sub(); } ``` Second level: ``` @consumes("text/plain") @produces("text/plain") interface SubClient { @path("/sub") SubSubClient sub(); } ``` Third and N levels (this was unsupported and now it's supported): ``` @consumes("text/plain") @produces("text/plain") interface SubSubClient { @get @path("/simple") String simpleGet(); } ``` Fix quarkusio#22055
Hi! Quick question on the release process. So the issue has been fixed, but the bot assigned it to milestone 2.7. Is there any chance this might be rather included in one of the 2.6 patch releases? If not, is there a timeline for 2.7? |
Describe the bug
When using reactive rest clients, defining sub sub (sub sub sub, ...) resources does not work. I can defined them, but on access, an
AbstractMethodError
is thrown.Expected behavior
I can define an arbitrary hierary of resources and subresources
Actual behavior
I can only define a single level of subresources. Accessing any further sub levels will result in an
AbstractMethodError
.How to Reproduce?
I've extended the test case in the quarkus repo to showcase the behavior: 2.5.1.Final...lordvlad:subsubresource-bug-reproducer
Output of
uname -a
orver
Linux son-nb-wru-01 5.11.0-41-generic #45~20.04.1-Ubuntu SMP Wed Nov 10 10:20:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.5.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)gradle 7.0
Additional information
works with quarkus-rest-client
Stack trace
The text was updated successfully, but these errors were encountered: