]> git.koha-community.org Git - koha.git/commit
Bug 27358: Add GET /public/biblios/:biblio_id/items
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 7 Jan 2021 11:50:43 +0000 (08:50 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 28 Oct 2021 15:32:34 +0000 (17:32 +0200)
commit9ef23bb642802dee9b2a9c2833daef32bf9b4e32
treefc6c6304e5a4e2988e44190637e1d0462d945373
parentf9070701163ddcfff076cdaff88087928a30866f
Bug 27358: Add GET /public/biblios/:biblio_id/items

This patch introduces a route to fetch items belonging to a biblio. It
is expected to return the 'public' representation of the Koha::Item
objects.

It is also enforcing the visibility rules, by using
Koha::Items->filter_by_visible_in_opac.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Test pass and they cover all the cases!
3. Try your favourite REST tool against the new route.
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Item.pm
Koha/REST/V1/Biblios.pm
api/v1/swagger/paths.json
api/v1/swagger/paths/biblios.json