snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Rest Data with Panache check if "?sort" parameter is specified #328

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 3 years ago

Description

To override the default behaviour of the HTTP GET method for rest-data-with-panache resource, we should create a facade class. It could be combination of Entity + PanacheRepository(facade) + PanacheRepositoryResource. Either we use HTTP GET method with or without "?sort" parameter we need to override repository method public PanacheQuery<UserEntity> findAll(Sort sort)

However, it could be useful to leave the default implementation of this method if we only want to override the default behaviour of HTTP GET without specifying "?sort" parameter. Thus the method public PanacheQuery<UserEntity> findAll() should affect this. Currently by overriding the findAll() method do not affect anything.

Code example: https://github.com/kshpak/panache-qa/blob/feature_get/src/main/java/org/acme/resteasyjackson/PersonRepository.java


https://github.com/quarkusio/quarkus/issues/16871


$upstream:16871$