-
Notifications
You must be signed in to change notification settings - Fork 125
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
Interface as Contract for Client/Server #1294
Comments
Thank you for filing your change request. Can you please briefly outline what the actual benefit for the user would be? I am using a shared interface for client and server since years with 100% pure JAX-RS API and never missed someting in the spec, so I am keen to learn why you want to have that? |
I'm not sure I understand. As far as I know, there's never been any stub/proxy support for REST clients in JAX-RS. That's always been added on top of the spec as part of RESTEasy or MP REST Client. |
The only client I see in the spec is https://jakarta.ee/specifications/restful-ws/4.0/jakarta-restful-ws-spec-4.0#client_api and that's not a proxy/stub model like MP REST Client. |
So IIUC then the actual core idea of this RFE is to enforce JAX-RS vendors to provide mandatory stub/proxy support? Then I would propose to change the title and description of this RFE to make that clear. Thanks. |
That's how I understood the issue description. Perhaps I'm wrong 🤷 |
@FroMage Currently the MP Rest Client supports interface client declaration. |
@hantsy What are you trying to reach ? |
@lukasj Of course, a big fan of Quarkus since it was born. |
Microprofile came as a reaction to a long delay between Java EE 7 and Java EE 8. After the transition of Java EE into Eclipse/Jakarta, there was a discussion about merging Microprofile and Jakarta. There also was a discussion about merging MP Rest Client into Jakarta REST. While it is possible to adopt MP REST Client in Jakarta REST, doing it without the support of MP group would only mean that the MP REST Client spec would be duplicated, and there would be evolution in both Jakarta and MP which would eventually lead to mutual incompatibility and exclusion. The current state is that implementations of Jakarta REST RestEasy and Jersey do implement also MP REST Client. |
As that is the case already, what would be the benefit of supporting this RFE? 🤔 |
It would enrich the possibilities for clients without the MP libs in their environment. It would also allow us to extend the existing feature set. It would provide more consistency between a new functionality in the Jakarta REST Client and the MP Rest Client. It makes sense for the MP Rest Client to be in the Jakarta REST Spec. There are multiple drawbacks such as that the Jakarta release cycle is slower than MP release cycle, the API namespace might have changed, and people in MP group do not care about Jakarta too much. These drawbacks seem to prevent the MP guys from supporting having the REST Client included in this Spec. |
|
It is not a bad thing, Jakarta EE can adopt the good part from MP when it becomes mature, such as JWT Auth, and MP REST client here. |
Red Hat is a -1 for bringing MicroProfile Specifications into Jakarta EE Specifications in general. For one this creates fragmentation. There is just no reason to create more fragmentation in the space. The governance is also different between MicroProfile and Jakarta EE allowing MicroProfile to move faster if desired. |
Spring 6.x introduces a declarative HTTP interface that can be the contract between the client and server.
https://docs.spring.io/spring-framework/reference/integration/rest-clients.html#rest-http-interface
Jakarta EE has a sister project MP which includes MP Rest Client to declare the Client via interface.
Is it possible to adopt the MP Rest client into REST spec?
The text was updated successfully, but these errors were encountered: