From d64e98f7ecb3f8a3e8aa5c01b365ff20fbeac10f 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 --- 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 810f2647db0..af3cd550870 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 4fe775fb367..8181cfd0442 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 827cffd8bb8..af4623cd62e 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 -- 2.50.1