Bugzilla – Attachment 154289 Details for
Bug 34431
Distinguish between status and status alias in ILL UI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34431: Allow for x-koha-embed in ill/backends endpoint
Bug-34431-Allow-for-x-koha-embed-in-illbackends-en.patch (text/plain), 1.95 KB, created by
Pedro Amorim
on 2023-08-04 16:07:35 UTC
(
hide
)
Description:
Bug 34431: Allow for x-koha-embed in ill/backends endpoint
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-08-04 16:07:35 UTC
Size:
1.95 KB
patch
obsolete
>From 57ad9a15cb9167481dd36bda81b44c11ec340909 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 4 Aug 2023 16:01:33 +0000 >Subject: [PATCH] Bug 34431: Allow for x-koha-embed in ill/backends endpoint > >--- > Koha/REST/V1/Illbackends.pm | 13 ++++++++++--- > api/v1/swagger/paths/ill_backends.yaml | 12 +++++++++++- > 2 files changed, 21 insertions(+), 4 deletions(-) > >diff --git a/Koha/REST/V1/Illbackends.pm b/Koha/REST/V1/Illbackends.pm >index 8b70d9368e..45b9c29922 100644 >--- a/Koha/REST/V1/Illbackends.pm >+++ b/Koha/REST/V1/Illbackends.pm >@@ -40,15 +40,22 @@ sub list { > > my $config = Koha::Illrequest::Config->new; > my $backends = $config->available_backends; >+ my $backend_module = Koha::Illbackend->new; > > my @data; > foreach my $b (@$backends) { > my $backend = Koha::Illrequest->new->load_backend($b); >- push @data, >- { >+ >+ my $embed = $backend_module->embed( >+ $b, >+ $c->req->headers->header('x-koha-embed') >+ ); >+ >+ my $return = { > ill_backend_id => $b, > capabilities => $backend->capabilities, >- }; >+ }; >+ push @data, $embed ? { %$return, %$embed } : $return; > } > return $c->render( status => 200, openapi => \@data ); > } >diff --git a/api/v1/swagger/paths/ill_backends.yaml b/api/v1/swagger/paths/ill_backends.yaml >index 874481a5ec..f076137527 100644 >--- a/api/v1/swagger/paths/ill_backends.yaml >+++ b/api/v1/swagger/paths/ill_backends.yaml >@@ -6,7 +6,17 @@ > tags: > - ill_backends > summary: List ILL backends >- parameters: [] >+ parameters: >+ - name: x-koha-embed >+ in: header >+ required: false >+ description: Embed list sent as a request header >+ type: array >+ items: >+ type: string >+ enum: >+ - statuses+strings >+ collectionFormat: csv > produces: > - application/json > responses: >-- >2.30.2
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 34431
:
154034
|
154035
|
154036
|
154037
|
154289
|
154290
|
154291
|
154292
|
154301
|
154405
|
154406
|
154407
|
154408
|
154409
|
154410
|
154999
|
161104
|
161105
|
161106
|
161107
|
161108
|
161109
|
161110
|
161129
|
161130
|
161131
|
161132
|
161133
|
161134
|
161135