Bugzilla – Attachment 127014 Details for
Bug 28613
Several objects.search-based routes missing parameters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28613: Add missing parameters to objects.search-based routes
Bug-28613-Add-missing-parameters-to-objectssearch-.patch (text/plain), 5.06 KB, created by
Martin Renvoize (ashimema)
on 2021-10-27 15:50:03 UTC
(
hide
)
Description:
Bug 28613: Add missing parameters to objects.search-based routes
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-10-27 15:50:03 UTC
Size:
5.06 KB
patch
obsolete
>From 4c54ed039924e34c60f4585d43008e261254e5f0 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 22 Jun 2021 08:52:56 -0300 >Subject: [PATCH] Bug 28613: Add missing parameters to objects.search-based > routes > >The objects.search helper provides convenient ways to paginate and a 'q' filter parameter to build complex queries on this Koha::Objects-based routes. > >Some routes were created prior to this feature getting introduced. We need to adjust the parameters for all existing objects.search-based routes. > >This patch adds that. > >The only GET (as in list) routes that would still be missing the >parameters are those about ILL, that are not objects.search based, and >probably need to be rewritten. > >https://bugs.koha-community.org/show_bug.cgi?id=28480 > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > api/v1/swagger/paths/acquisitions_funds.json | 12 +++++++++-- > .../swagger/paths/acquisitions_vendors.json | 6 ++++++ > .../swagger/paths/advancededitormacros.json | 21 +++++++++++++++++++ > api/v1/swagger/paths/checkouts.json | 6 ++++++ > .../swagger/paths/import_batch_profiles.json | 9 ++++++++ > api/v1/swagger/paths/items.json | 9 ++++++++ > 6 files changed, 61 insertions(+), 2 deletions(-) > >diff --git a/api/v1/swagger/paths/acquisitions_funds.json b/api/v1/swagger/paths/acquisitions_funds.json >index 299a8776db..22e01660a7 100644 >--- a/api/v1/swagger/paths/acquisitions_funds.json >+++ b/api/v1/swagger/paths/acquisitions_funds.json >@@ -33,8 +33,16 @@ > }, > { > "$ref": "../parameters.json#/per_page" >- } >- ], >+ }, >+ { >+ "$ref": "../parameters.json#/q_param" >+ }, >+ { >+ "$ref": "../parameters.json#/q_body" >+ }, >+ { >+ "$ref": "../parameters.json#/q_header" >+ }], > "responses": { > "200": { > "description": "A list of funds", >diff --git a/api/v1/swagger/paths/acquisitions_vendors.json b/api/v1/swagger/paths/acquisitions_vendors.json >index 32f67097bb..995e787957 100644 >--- a/api/v1/swagger/paths/acquisitions_vendors.json >+++ b/api/v1/swagger/paths/acquisitions_vendors.json >@@ -28,6 +28,12 @@ > "$ref": "../parameters.json#/page" > }, { > "$ref": "../parameters.json#/per_page" >+ }, { >+ "$ref": "../parameters.json#/q_param" >+ }, { >+ "$ref": "../parameters.json#/q_body" >+ }, { >+ "$ref": "../parameters.json#/q_header" > }], > "responses": { > "200": { >diff --git a/api/v1/swagger/paths/advancededitormacros.json b/api/v1/swagger/paths/advancededitormacros.json >index fbc589988a..d28e1c9cc9 100644 >--- a/api/v1/swagger/paths/advancededitormacros.json >+++ b/api/v1/swagger/paths/advancededitormacros.json >@@ -36,6 +36,27 @@ > "description": "Search on shared macros", > "required": false, > "type": "string" >+ }, >+ { >+ "$ref": "../parameters.json#/match" >+ }, >+ { >+ "$ref": "../parameters.json#/order_by" >+ }, >+ { >+ "$ref": "../parameters.json#/page" >+ }, >+ { >+ "$ref": "../parameters.json#/per_page" >+ }, >+ { >+ "$ref": "../parameters.json#/q_param" >+ }, >+ { >+ "$ref": "../parameters.json#/q_body" >+ }, >+ { >+ "$ref": "../parameters.json#/q_header" > } > ], > "responses": { >diff --git a/api/v1/swagger/paths/checkouts.json b/api/v1/swagger/paths/checkouts.json >index e79a5db01d..f3f36e53c3 100644 >--- a/api/v1/swagger/paths/checkouts.json >+++ b/api/v1/swagger/paths/checkouts.json >@@ -15,6 +15,12 @@ > "$ref": "../parameters.json#/match" > }, { > "$ref": "../parameters.json#/order_by" >+ }, { >+ "$ref": "../parameters.json#/q_param" >+ }, { >+ "$ref": "../parameters.json#/q_body" >+ }, { >+ "$ref": "../parameters.json#/q_header" > },{ > "name": "checked_in", > "in": "query", >diff --git a/api/v1/swagger/paths/import_batch_profiles.json b/api/v1/swagger/paths/import_batch_profiles.json >index 9c6e1c5ba9..6363e9adbe 100644 >--- a/api/v1/swagger/paths/import_batch_profiles.json >+++ b/api/v1/swagger/paths/import_batch_profiles.json >@@ -26,6 +26,15 @@ > }, > { > "$ref": "../parameters.json#/per_page" >+ }, >+ { >+ "$ref": "../parameters.json#/q_param" >+ }, >+ { >+ "$ref": "../parameters.json#/q_body" >+ }, >+ { >+ "$ref": "../parameters.json#/q_header" > } > ], > "consumes": [ >diff --git a/api/v1/swagger/paths/items.json b/api/v1/swagger/paths/items.json >index 7c18f625ee..2b2c86c09d 100644 >--- a/api/v1/swagger/paths/items.json >+++ b/api/v1/swagger/paths/items.json >@@ -26,6 +26,15 @@ > }, > { > "$ref": "../parameters.json#/per_page" >+ }, >+ { >+ "$ref": "../parameters.json#/q_param" >+ }, >+ { >+ "$ref": "../parameters.json#/q_body" >+ }, >+ { >+ "$ref": "../parameters.json#/q_header" > } > ], > "consumes": [ >-- >2.20.1
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 28613
:
122279
| 127014