Bug 28701: Adding primary_contact_method to the REST API

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 <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4b34532dec)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
This commit is contained in:
Alexis Ripetti 2025-10-16 10:45:59 -03:00 committed by Jacob O'Mara
parent 3796ed4f74
commit 225d08c482
No known key found for this signature in database
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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"