Skip to content
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

RestClient not evaluating API annotations in class hierarchy #13263

Closed
georgleber opened this issue Nov 12, 2020 · 5 comments
Closed

RestClient not evaluating API annotations in class hierarchy #13263

georgleber opened this issue Nov 12, 2020 · 5 comments
Labels
area/rest-client kind/bug Something isn't working

Comments

@georgleber
Copy link
Contributor

Describe the bug
In a RestClient implementation the additional API annotations in the class hierarchy are not evaluated. So that it is needed to duplicate the annotation on the RestClient interface.

Expected behavior
I would expect that annotations are evaluated in the class hierarchy, like it is done in the JAX-RS resource implementation, where e.g. the @Path annotation can be used in an interface.

Actual behavior
Annotations in the class hierarchy are ignored. The @Path annotation must be explicitly set on the interface which is annotated with @RegisterRestClient.

To Reproduce
https://github.com/GeorgHenkel/quarkus-restclient-error

  1. Start modules impl and service with ./mvnw quarkus:dev
  2. Request URL http://0.0.0.0:8080/test/myName -> Returns 404
  3. Request URL http://0.0.0.0:8080/test/with-path/myName -> Returns 200 with json body: { "name": "myName" }

Environment (please complete the following information):

  • Output of uname -a or ver:

Darwin MacBook-Pro.local 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu- 6153.141.2.2~1/RELEASE_X86_64 x86_64

  • Output of java -version:

openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.8+10, mixed mode)

  • Quarkus version or git rev:

1.9.2.Final

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

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Users/georgleber/.m2/wrapper/dists/apache-maven-3.6.3-bin/1iopthnavndlasol9gbrbg6bf2/apache-maven-3.6.3
Java version: 11.0.8, vendor: AdoptOpenJDK, runtime: /Users/georgleber/.sdkman/candidates/java/11.0.8.hs-adpt
Default locale: de_DE, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.7", arch: "x86_64", family: "mac"

@georgleber georgleber added the kind/bug Something isn't working label Nov 12, 2020
@ghost ghost added the triage/needs-triage label Nov 12, 2020
@rquinio
Copy link
Contributor

rquinio commented Nov 18, 2020

Linking to eclipse/microprofile-rest-client#262, as it appears to be an issue in the spec.

@quarkus-bot
Copy link

quarkus-bot bot commented Jan 5, 2023

/cc @Sgitario(rest-client), @cescoffier(rest-client), @geoand(rest-client)

@gsmet
Copy link
Member

gsmet commented Jan 5, 2023

From the discussion I can see in the MP issue, it seems to be a behavior mandated by spec so I will close this one.

@gsmet gsmet closed this as completed Jan 5, 2023
@geoand
Copy link
Contributor

geoand commented Jan 5, 2023

Is this still an issue with quarkus-rest-client-reactive?

@geoand
Copy link
Contributor

geoand commented Jan 5, 2023

👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest-client kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants