Repository: quarkusio/quarkus
Issue: RESTEasy Reactive: UniInvoker signatures are wrong

Due to how we implement it, all its return types are `Uni<?>` instead of the more useful `Uni<R>` for methods like `<R> get(Class<R>)`, forcing users to cast the return types to the right type:

```java
UniInvoker invocation = target.request().rx(UniInvoker.class);
Uni<String> ret = (Uni<String>) invocation.get(String.class);
```

This is because we implemented it with:

```java
public class UniInvoker extends AbstractRxInvoker<Uni<?>> {}
...
public abstract class AbstractRxInvoker<T> implements RxInvoker<T> {

    @Override
    public <R> T get(Class<R> responseType) {
        return method("GET", responseType);
    }
}
```

Now, for some reason the JAXRS interface is:

```java
public interface RxInvoker<T> {

    public <R> T get(Class<R> responseType);
}
```

Which is pretty useless. We could mitigate this by making `UniInvoker` generic.

Or we could do like for `MultiInvoker` (for some reason this does pass the Java type system):

```java
public class MultiInvoker extends AbstractRxInvoker<Multi<?>> {

    @SuppressWarnings("unchecked")
    @Override
    public <R> Multi<R> get(Class<R> responseType) {
        return (Multi<R>) super.get(responseType);
    }
}
```

Perhaps we should do both (generify and fix the signature via that weirdly allowed covariant override)?

Changed files:
independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/UniInvoker.java

diff --git a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/UniInvoker.java b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/UniInvoker.java
index 335231f54d8..ab96cb7ab95 100644
--- a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/UniInvoker.java
+++ b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/UniInvoker.java
@@ -3,6 +3,7 @@
 import io.smallrye.mutiny.Uni;
 import javax.ws.rs.client.Entity;
 import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
 
 public class UniInvoker extends AbstractRxInvoker<Uni<?>> {
 
@@ -18,4 +19,123 @@ public <R> Uni<R> method(String name, Entity<?> entity, GenericType<R> responseT
         return Uni.createFrom().completionStage(invoker.method(name, entity, responseType));
     }
 
+    @Override
+    public Uni<Response> get() {
+        return (Uni<Response>) super.get();
+    }
+
+    @Override
+    public <T> Uni<T> get(Class<T> responseType) {
+        return (Uni<T>) super.get(responseType);
+    }
+
+    @Override
+    public <T> Uni<T> get(GenericType<T> responseType) {
+        return (Uni<T>) super.get(responseType);
+    }
+
+    @Override
+    public Uni<Response> put(Entity<?> entity) {
+        return (Uni<Response>) super.put(entity);
+    }
+
+    @Override
+    public <T> Uni<T> put(Entity<?> entity, Class<T> clazz) {
+        return (Uni<T>) super.put(entity, clazz);
+    }
+
+    @Override
+    public <T> Uni<T> put(Entity<?> entity, GenericType<T> type) {
+        return (Uni<T>) super.put(entity, type);
+    }
+
+    @Override
+    public Uni<Response> post(Entity<?> entity) {
+        return (Uni<Response>) super.post(entity);
+    }
+
+    @Override
+    public <T> Uni<T> post(Entity<?> entity, Class<T> clazz) {
+        return (Uni<T>) super.post(entity, clazz);
+    }
+
+    @Override
+    public <T> Uni<T> post(Entity<?> entity, GenericType<T> type) {
+        return (Uni<T>) super.post(entity, type);
+    }
+
+    @Override
+    public Uni<Response> delete() {
+        return (Uni<Response>) super.delete();
+    }
+
+    @Override
+    public <T> Uni<T> delete(Class<T> responseType) {
+        return (Uni<T>) super.delete(responseType);
+    }
+
+    @Override
+    public <T> Uni<T> delete(GenericType<T> responseType) {
+        return (Uni<T>) super.delete(responseType);
+    }
+
+    @Override
+    public Uni<Response> head() {
+        return (Uni<Response>) super.head();
+    }
+
+    @Override
+    public Uni<Response> options() {
+        return (Uni<Response>) super.options();
+    }
+
+    @Override
+    public <T> Uni<T> options(Class<T> responseType) {
+        return (Uni<T>) super.options(responseType);
+    }
+
+    @Override
+    public <T> Uni<T> options(GenericType<T> responseType) {
+        return (Uni<T>) super.options(responseType);
+    }
+
+    @Override
+    public Uni<Response> trace() {
+        return (Uni<Response>) super.trace();
+    }
+
+    @Override
+    public <T> Uni<T> trace(Class<T> responseType) {
+        return (Uni<T>) super.trace(responseType);
+    }
+
+    @Override
+    public <T> Uni<T> trace(GenericType<T> responseType) {
+        return (Uni<T>) super.trace(responseType);
+    }
+
+    @Override
+    public Uni<Response> method(String name) {
+        return (Uni<Response>) super.method(name);
+    }
+
+    @Override
+    public <T> Uni<T> method(String name, Class<T> responseType) {
+        return (Uni<T>) super.method(name, responseType);
+    }
+
+    @Override
+    public <T> Uni<T> method(String name, GenericType<T> responseType) {
+        return (Uni<T>) super.method(name, responseType);
+    }
+
+    @Override
+    public Uni<Response> method(String name, Entity<?> entity) {
+        return (Uni<Response>) super.method(name, entity);
+    }
+
+    @Override
+    public <T> Uni<T> method(String name, Entity<?> entity, Class<T> responseType) {
+        return (Uni<T>) super.method(name, entity, responseType);
+    }
 }