]> git.koha-community.org Git - koha.git/commit
Bug 16330: Move patches to OpenAPI
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 4 Dec 2017 19:18:47 +0000 (16:18 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 29 Mar 2018 14:42:06 +0000 (11:42 -0300)
commitdd9b6c165163ac1d6b52df6f2df17ec5de6b2758
treefdd5a75c445a630d12020a9b543dd5301e4784b7
parent7b8909cb9080216352b0a68564476c8861f7e790
Bug 16330: Move patches to OpenAPI

This patch refactors the original work so it implements the controllers
and the spec using Mojolicious::Plugin::OpenAPI, and OpenAPI for the specification.

It removes the ability for patrons without permissions to edit their own data or their
guarantee's. This will be moved to a patron modification requests endpoint for simplicity.

It makes use of bugs 19410 and 19686 and their dependencies to deal with parameters handling,
query building and pagination.

Tests are adapted.

To test:
- Apply this patches and the dependencies
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
- Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/REST/V1/Patron.pm
api/v1/swagger/paths/patrons.json
t/db_dependent/api/v1/patrons.t