From f9db5716c95a2ebd4b7404bae5bc64f01cdea03d Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 29 Jul 2025 11:17:42 -0300 Subject: [PATCH] Bug 40542: Add strings embed to holds-related endpoints This patch makes holds endpoints be allowed to embed strings. To test: 1. Use your favourite REST tool to hit /api/v1/holds 2. Add the `x-koha-embed: +strings` header. => FAIL: The API rejects because it is not equiped with the feature. 3. Apply this patches 4. Run: $ ktd --shell k$ yarn api:bundle k$ koha-plack --restart kohadev 5. Repeat 2 => SUCCESS: It works! 6. Sign off :-D Signed-off-by: David Nind Signed-off-by: Jonathan Druart Signed-off-by: Lucas Gass (cherry picked from commit e90bc5020987517de9598eba3347ccfe38ff35b5) Signed-off-by: Paul Derscheid --- api/v1/swagger/definitions/hold.yaml | 5 +++++ api/v1/swagger/paths/holds.yaml | 1 + api/v1/swagger/paths/patrons_holds.yaml | 1 + 3 files changed, 7 insertions(+) diff --git a/api/v1/swagger/definitions/hold.yaml b/api/v1/swagger/definitions/hold.yaml index 810f2647db..af3cd55087 100644 --- a/api/v1/swagger/definitions/hold.yaml +++ b/api/v1/swagger/definitions/hold.yaml @@ -135,5 +135,10 @@ properties: - object - "null" description: Pickup library + _strings: + type: + - object + - "null" + description: A list of stringified coded values additionalProperties: false diff --git a/api/v1/swagger/paths/holds.yaml b/api/v1/swagger/paths/holds.yaml index 4fe775fb36..8181cfd044 100644 --- a/api/v1/swagger/paths/holds.yaml +++ b/api/v1/swagger/paths/holds.yaml @@ -101,6 +101,7 @@ items: type: string enum: + - +strings - cancellation_requested - biblio - deleted_biblio diff --git a/api/v1/swagger/paths/patrons_holds.yaml b/api/v1/swagger/paths/patrons_holds.yaml index 827cffd8bb..af4623cd62 100644 --- a/api/v1/swagger/paths/patrons_holds.yaml +++ b/api/v1/swagger/paths/patrons_holds.yaml @@ -28,6 +28,7 @@ items: type: string enum: + - +strings - cancellation_requested - biblio - deleted_biblio