diff --git a/extensions/panache/hibernate-reactive-rest-data-panache/deployment/src/test/java/io/quarkus/hibernate/reactive/rest/data/panache/deployment/repository/CollectionsResource.java b/extensions/panache/hibernate-reactive-rest-data-panache/deployment/src/test/java/io/quarkus/hibernate/reactive/rest/data/panache/deployment/repository/CollectionsResource.java index 853e593fb6faa..e24f791173789 100644 --- a/extensions/panache/hibernate-reactive-rest-data-panache/deployment/src/test/java/io/quarkus/hibernate/reactive/rest/data/panache/deployment/repository/CollectionsResource.java +++ b/extensions/panache/hibernate-reactive-rest-data-panache/deployment/src/test/java/io/quarkus/hibernate/reactive/rest/data/panache/deployment/repository/CollectionsResource.java @@ -3,9 +3,11 @@ import io.quarkus.hibernate.reactive.rest.data.panache.PanacheRepositoryResource; import io.quarkus.rest.data.panache.MethodProperties; import io.quarkus.rest.data.panache.ResourceProperties; +import io.smallrye.mutiny.Uni; @ResourceProperties(hal = true, paged = false, halCollectionName = "item-collections", rolesAllowed = "user") public interface CollectionsResource extends PanacheRepositoryResource { + @MethodProperties(rolesAllowed = "admin") - boolean delete(String name); + Uni delete(String name); } diff --git a/extensions/panache/hibernate-reactive-rest-data-panache/deployment/src/test/java/io/quarkus/hibernate/reactive/rest/data/panache/deployment/repository/PanacheRepositoryResourcePathCustomisationTest.java b/extensions/panache/hibernate-reactive-rest-data-panache/deployment/src/test/java/io/quarkus/hibernate/reactive/rest/data/panache/deployment/repository/PanacheRepositoryResourcePathCustomisationTest.java index d2eee7539c501..276493f06b93f 100644 --- a/extensions/panache/hibernate-reactive-rest-data-panache/deployment/src/test/java/io/quarkus/hibernate/reactive/rest/data/panache/deployment/repository/PanacheRepositoryResourcePathCustomisationTest.java +++ b/extensions/panache/hibernate-reactive-rest-data-panache/deployment/src/test/java/io/quarkus/hibernate/reactive/rest/data/panache/deployment/repository/PanacheRepositoryResourcePathCustomisationTest.java @@ -11,6 +11,7 @@ import io.quarkus.rest.data.panache.MethodProperties; import io.quarkus.rest.data.panache.ResourceProperties; import io.quarkus.test.QuarkusUnitTest; +import io.smallrye.mutiny.Uni; class PanacheRepositoryResourcePathCustomisationTest extends AbstractPathCustomisationTest { @@ -27,18 +28,18 @@ public interface CustomPathCollectionsResource extends PanacheRepositoryResource { @MethodProperties(path = "api") - List list(Page page, Sort sort); + Uni> list(Page page, Sort sort); @MethodProperties(path = "api") - Collection get(String name); + Uni get(String name); @MethodProperties(path = "api") - Collection add(Collection collection); + Uni add(Collection collection); @MethodProperties(path = "api") - Collection update(String name, Collection collection); + Uni update(String name, Collection collection); @MethodProperties(path = "api") - boolean delete(String name); + Uni delete(String name); } } diff --git a/extensions/panache/hibernate-reactive-rest-data-panache/runtime/src/main/java/io/quarkus/hibernate/reactive/rest/data/panache/PanacheRepositoryResource.java b/extensions/panache/hibernate-reactive-rest-data-panache/runtime/src/main/java/io/quarkus/hibernate/reactive/rest/data/panache/PanacheRepositoryResource.java index 8fa61c3a2e5ca..27a7edfb55fc9 100644 --- a/extensions/panache/hibernate-reactive-rest-data-panache/runtime/src/main/java/io/quarkus/hibernate/reactive/rest/data/panache/PanacheRepositoryResource.java +++ b/extensions/panache/hibernate-reactive-rest-data-panache/runtime/src/main/java/io/quarkus/hibernate/reactive/rest/data/panache/PanacheRepositoryResource.java @@ -2,6 +2,7 @@ import io.quarkus.hibernate.reactive.panache.PanacheRepositoryBase; import io.quarkus.rest.data.panache.MethodProperties; +import io.quarkus.rest.data.panache.ReactiveRestDataResource; import io.quarkus.rest.data.panache.ResourceProperties; import io.quarkus.rest.data.panache.RestDataResource; @@ -18,6 +19,6 @@ * @param ID type of the entity. */ public interface PanacheRepositoryResource, Entity, ID> - extends RestDataResource { + extends ReactiveRestDataResource { }