Bugzilla – Attachment 186441 Details for
Bug 40808
Consider a link table for accountlines to varying other Koha tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40808: Add REST API embedding support for hold account_lines
Bug-40808-Add-REST-API-embedding-support-for-hold-.patch (text/plain), 2.42 KB, created by
Martin Renvoize (ashimema)
on 2025-09-15 18:00:49 UTC
(
hide
)
Description:
Bug 40808: Add REST API embedding support for hold account_lines
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-09-15 18:00:49 UTC
Size:
2.42 KB
patch
obsolete
>From 585570a425799d63762423fa0d97eb0154225e21 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Mon, 15 Sep 2025 14:13:05 +0100 >Subject: [PATCH] Bug 40808: Add REST API embedding support for hold > account_lines > >Adds support for embedding account lines in holds via the REST API: > >1. api/v1/swagger/definitions/hold.yaml - Adds account_lines property > to hold definition for API output when embedded > >2. api/v1/swagger/paths/holds.yaml - Adds account_lines to the > x-koha-embed enum for the GET /holds endpoint > >3. api/v1/swagger/paths/patrons_holds.yaml - Adds account_lines to > the x-koha-embed enum for GET /patrons/{patron_id}/holds endpoint > >Usage: > GET /api/v1/holds?x-koha-embed=account_lines > GET /api/v1/patrons/123/holds?x-koha-embed=account_lines > >This allows API consumers to retrieve holds with their associated >charges/fees in a single request, enabling efficient access to >hold-related financial information. >--- > api/v1/swagger/definitions/hold.yaml | 7 +++++++ > api/v1/swagger/paths/holds.yaml | 1 + > api/v1/swagger/paths/patrons_holds.yaml | 1 + > 3 files changed, 9 insertions(+) > >diff --git a/api/v1/swagger/definitions/hold.yaml b/api/v1/swagger/definitions/hold.yaml >index f09580f8747..a88f6103d73 100644 >--- a/api/v1/swagger/definitions/hold.yaml >+++ b/api/v1/swagger/definitions/hold.yaml >@@ -144,6 +144,13 @@ properties: > - object > - "null" > description: Patron for hold >+ debits: >+ type: >+ - array >+ - "null" >+ description: Debits (charges) linked to this hold (x-koha-embed) >+ items: >+ $ref: "./debit.yaml" > _strings: > type: > - object >diff --git a/api/v1/swagger/paths/holds.yaml b/api/v1/swagger/paths/holds.yaml >index 388a446ab9d..d1d20715cb6 100644 >--- a/api/v1/swagger/paths/holds.yaml >+++ b/api/v1/swagger/paths/holds.yaml >@@ -108,6 +108,7 @@ > - pickup_library > - item > - patron >+ - debits > collectionFormat: csv > produces: > - application/json >diff --git a/api/v1/swagger/paths/patrons_holds.yaml b/api/v1/swagger/paths/patrons_holds.yaml >index b8c28f30d83..739451e2fa9 100644 >--- a/api/v1/swagger/paths/patrons_holds.yaml >+++ b/api/v1/swagger/paths/patrons_holds.yaml >@@ -34,6 +34,7 @@ > - deleted_biblio > - item > - pickup_library >+ - account_lines > collectionFormat: csv > produces: > - application/json >-- >2.51.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40808
:
186436
|
186437
|
186438
|
186439
|
186440
|
186441
|
186442
|
186443
|
186458
|
186459
|
186460
|
186461
|
186462
|
186463
|
186464
|
186465