]> git.koha-community.org Git - koha.git/commit
Bug 19370: (QA follow-up) Use OpenAPI's handling of pipe separated values
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 23 Nov 2017 13:45:59 +0000 (10:45 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 11 Dec 2017 20:46:59 +0000 (17:46 -0300)
commit8430a541af9302ae6cef247253000c1469ae2f33
treeb22ec8fe1b98422c712f1ca3d34dcc30e62401b7
parent254883608912456bc15f57cf282099b8641faf54
Bug 19370: (QA follow-up) Use OpenAPI's handling of pipe separated values

This patch makes the helper handling _order_by params expect a list of
values instead of a (to-be-splitted) string.

The idea is that the OpenAPI plugin will take care of splitting
pipe-delimited values if the spec is correctly defined.

Note: In the process I noticed + on the URL represents a space, so the
helper function is updated to handle both + and %2B as ascending.

To test:
- Run:
  $ kshell
 k$ prove t/Koha/REST/Plugin/Query.t
=> SUCCESS: Tests pass!
- Sign off :-D

Edit: Removed rebasing leftover making the tests fail.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/REST/Plugin/Query.pm
t/Koha/REST/Plugin/Query.t