Bugzilla – Attachment 190923 Details for
Bug 41530
item_type vs item_type_id inconsistencies in the API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41530: Rename item_type => item_type_id in suggestions API spec
5e503a7.patch (text/plain), 2.01 KB, created by
Martin Renvoize (ashimema)
on 2026-01-06 10:47:55 UTC
(
hide
)
Description:
Bug 41530: Rename item_type => item_type_id in suggestions API spec
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2026-01-06 10:47:55 UTC
Size:
2.01 KB
patch
obsolete
>From 5e503a77c9f11fb431ef17a42cce4a905ae6472a Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Tue, 6 Jan 2026 10:43:44 +0000 >Subject: [PATCH] Bug 41530: Rename item_type => item_type_id in suggestions > API spec > >Following the API consistency work in bug 41456, this patch renames >the item_type field to item_type_id in the suggestions API definition. > >The field should only be named item_type when it contains an embedded >object (type: object/null). When it contains a foreign key ID >(type: string/null), it should be named item_type_id for consistency. > >Changes: >- Updated api/v1/swagger/definitions/suggestion.yaml >- Updated Koha::Suggestion->to_api_mapping > >Test plan: >1. Run API tests: prove t/db_dependent/api/v1/suggestions.t >2. Verify suggestions API continues to work correctly >3. Check that item_type_id field is properly mapped in API responses >--- > Koha/Suggestion.pm | 2 +- > api/v1/swagger/definitions/suggestion.yaml | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/Suggestion.pm b/Koha/Suggestion.pm >index 8c1481c57ac..2d0d369194e 100644 >--- a/Koha/Suggestion.pm >+++ b/Koha/Suggestion.pm >@@ -285,7 +285,7 @@ sub to_api_mapping { > budgetid => 'budget_id', > branchcode => 'library_id', > collectiontitle => 'collection_title', >- itemtype => 'item_type', >+ itemtype => 'item_type_id', > quantity => 'quantity', > currency => 'currency', > price => 'item_price', >diff --git a/api/v1/swagger/definitions/suggestion.yaml b/api/v1/swagger/definitions/suggestion.yaml >index 4567c5c3422..f1ca1267f73 100644 >--- a/api/v1/swagger/definitions/suggestion.yaml >+++ b/api/v1/swagger/definitions/suggestion.yaml >@@ -161,7 +161,7 @@ properties: > - string > - "null" > description: collection name for the suggested item >- item_type: >+ item_type_id: > type: > - string > - "null" >-- >2.52.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 41530
:
190922
| 190923 |
190924