]> git.koha-community.org Git - koha.git/commit
Bug 7317: (followup) Migrate endpoint to OpenAPI
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 23 Oct 2017 18:34:01 +0000 (15:34 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 9 Nov 2017 14:42:13 +0000 (11:42 -0300)
commitc99e814a6fd5b9e05deaa0adc4fbe8e37aef58fd
tree842dc9f65a77c175cf54b738a6aefc1c5d15e53c
parent81df964bbd0337df0a202cbec2fc96a2cba3ec33
Bug 7317: (followup) Migrate endpoint to OpenAPI

This patch moves the current endpoint implementation from Swagger2 to
the OpenAPI plugin.

It also takes advantage of the overloaded Koha::Illrequest::TO_JSON method
which has now the option to embed what's needed for the REST api.

The path spec is adjusted to fit OpenAPI, and some minor fixes are
applied:
- Missing 'metadata' query param
- 'ill' permissions should be required instead of 'borrowers'
- Full test coverage

To test:
- Apply  this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/illrequests.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/REST/V1/Illrequests.pm
api/v1/swagger/paths/illrequests.json
t/db_dependent/api/v1/illrequests.t