Bug 39816: Allow embedding `late_since_days` in baskets

This patch adds the option to embed the return value of the
`late_since_days` method in basket objects in the REST API.

It does so by just adding it to the list of embeds in the spec. It is
added in every place baskets can be returned.

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Tomas Cohen Arazi 2025-05-02 14:15:12 -03:00 committed by Lucas Gass
parent fb9ab9c789
commit 98153c5835
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
3 changed files with 17 additions and 0 deletions

View File

@ -84,4 +84,9 @@ properties:
- null
description: "When items should be created for orders in this basket (Options:
'ordering', 'receiving', 'cataloguing'. Null means system wide config)"
late_since_days:
type:
- integer
- "null"
description: The number of days the basket is late (x-koha-embed)
additionalProperties: false

View File

@ -14,6 +14,16 @@
- $ref: "../swagger.yaml#/parameters/per_page"
- $ref: "../swagger.yaml#/parameters/q_param"
- $ref: "../swagger.yaml#/parameters/q_body"
- name: x-koha-embed
in: header
required: false
description: Embed list sent as a request header
type: array
items:
type: string
enum:
- late_since_days
collectionFormat: csv
produces:
- application/json
responses:

View File

@ -53,6 +53,7 @@
- basket
- basket.basket_group
- basket.creator
- basket.late_since_days
- biblio
- biblio.uncancelled_orders+count
- biblio.holds+count
@ -180,6 +181,7 @@
- basket
- basket.basket_group
- basket.creator
- basket.late_since_days
- biblio
- biblio.uncancelled_orders+count
- biblio.holds+count