From c5650f691ae83d0c6cdba99681e69ce9109b859f Mon Sep 17 00:00:00 2001 From: Alexis Ripetti Date: Wed, 15 Jun 2022 16:33:53 -0400 Subject: [PATCH] Bug 28701 - Adding primary_contact_method to the REST API spec 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 --- 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 b5142dba06..b182d14b34 100644 --- a/api/v1/swagger/definitions/patron.yaml +++ b/api/v1/swagger/definitions/patron.yaml @@ -374,6 +374,11 @@ properties: - object - "null" description: Library of the patron + primary_contact_method: + type: + - string + - "null" + description: patron's primary contact method additionalProperties: false required: - surname diff --git a/api/v1/swagger/paths/patrons.yaml b/api/v1/swagger/paths/patrons.yaml index 1100a9fba9..19f9bcde60 100644 --- a/api/v1/swagger/paths/patrons.yaml +++ b/api/v1/swagger/paths/patrons.yaml @@ -339,6 +339,11 @@ description: Search on login_attempts required: false type: string + - 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.30.2