From 27ddecefed613c48d20e9a509788aa760aaf841b Mon Sep 17 00:00:00 2001 From: Alexis Ripetti Date: Thu, 16 Oct 2025 10:45:59 -0300 Subject: [PATCH] Bug 28701: Adding primary_contact_method to the REST API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds the primary_contact_method field to the api response for patrons To test: 1 - GET http://localhost:8081/api/v1/patrons/51 2 - Look for primary_contact_method, it's not there 3 - Apply patch 4 - GET http://localhost:8081/api/v1/patrons/51 5 - Look for primary_contact_method, it's not there Signed-off-by: Nick Clemens Signed-off-by: Marcel de Rooy Signed-off-by: Tomás Cohen Arazi --- api/v1/swagger/definitions/patron.yaml | 5 +++++ api/v1/swagger/paths/patrons.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/api/v1/swagger/definitions/patron.yaml b/api/v1/swagger/definitions/patron.yaml index 72f64fac15b..6e99899afd5 100644 --- a/api/v1/swagger/definitions/patron.yaml +++ b/api/v1/swagger/definitions/patron.yaml @@ -402,6 +402,11 @@ properties: type: - boolean description: Protected status of the patron + primary_contact_method: + type: + - string + - "null" + description: patron's primary contact method _strings: type: - object diff --git a/api/v1/swagger/paths/patrons.yaml b/api/v1/swagger/paths/patrons.yaml index a7df190ba3e..e32249d680b 100644 --- a/api/v1/swagger/paths/patrons.yaml +++ b/api/v1/swagger/paths/patrons.yaml @@ -349,6 +349,11 @@ description: Search on protected status required: false type: boolean + - name: primary_contact_method + in: query + description: Case insensitive search on primary_contact_method + required: false + type: string - $ref: "../swagger.yaml#/parameters/match" - $ref: "../swagger.yaml#/parameters/order_by" - $ref: "../swagger.yaml#/parameters/page" -- 2.51.0