From 96afa60670b4effcab975e79488640d5de47164c Mon Sep 17 00:00:00 2001
From: Tobias Gross-Vogt <tgros@tugraz.at>
Date: Thu, 27 Oct 2022 11:36:22 +0200
Subject: [PATCH] partial pagination now default

---
 src/DataProvider/OrganizationCollectionDataProvider.php | 2 ++
 src/Entity/Organization.php                             | 7 +++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/DataProvider/OrganizationCollectionDataProvider.php b/src/DataProvider/OrganizationCollectionDataProvider.php
index 43995a2..2a85afc 100644
--- a/src/DataProvider/OrganizationCollectionDataProvider.php
+++ b/src/DataProvider/OrganizationCollectionDataProvider.php
@@ -55,6 +55,8 @@ final class OrganizationCollectionDataProvider extends AbstractController implem
         }
 
         LocalData::addOptions($options, $filters);
+
+        $filters['partialPagination'] = true;
         Pagination::addOptions($options, $filters, self::MAX_ITEMS_PER_PAGE);
 
         // @deprecate 'lang' filter is deprecate, use 'Accept-Language' header instead
diff --git a/src/Entity/Organization.php b/src/Entity/Organization.php
index 0c5105b..499e723 100644
--- a/src/Entity/Organization.php
+++ b/src/Entity/Organization.php
@@ -19,10 +19,9 @@ use Dbp\Relay\CoreBundle\LocalData\LocalDataAwareTrait;
  *                 "tags" = {"BaseOrganization"},
  *                 "parameters" = {
  *                     {"name" = "search", "in" = "query", "description" = "Search filter (partial, case-insensitive text search on 'name' attribute)", "type" = "string", "required" = false},
- *                     {"name" = "person", "in" = "query", "description" = "DEPRECATE: Get organizations of a person (ID of BasePerson resource)", "type" = "string", "required" = false},
+ *                     {"name" = "person", "in" = "query", "description" = "DEPRECATED: Get organizations of a person (ID of BasePerson resource)", "type" = "string", "required" = false},
  *                     {"name" = "queryLocal", "in" = "query", "description" = "Local query parameters to apply", "type" = "string"},
- *                     {"name" = "includeLocal", "in" = "query", "description" = "Local data attributes to include", "type" = "string", "example" = "BaseOrganization.code"},
- *                     {"name" = "partialPagination", "in" = "query", "description" = "Partial pagination", "type" = "bool", "example" = "false"}
+ *                     {"name" = "includeLocal", "in" = "query", "description" = "Local data attributes to include", "type" = "string", "example" = "code"}
  *                 }
  *             }
  *         }
@@ -35,7 +34,7 @@ use Dbp\Relay\CoreBundle\LocalData\LocalDataAwareTrait;
  *                 "tags" = {"BaseOrganization"},
  *                 "parameters" = {
  *                     {"name" = "identifier", "in" = "path", "description" = "Resource identifier", "required" = true, "type" = "string", "example" = "1190"},
- *                     {"name" = "includeLocal", "in" = "query", "description" = "Local data attributes to include", "type" = "string", "example" = "BaseOrganization.code"}
+ *                     {"name" = "includeLocal", "in" = "query", "description" = "Local data attributes to include", "type" = "string", "example" = "code"}
  *                 }
  *             }
  *         },
-- 
GitLab