]> git.koha-community.org Git - koha.git/commit
Bug 19784: Adapt /v1/patrons to new naming guidelines
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 8 Dec 2017 12:35:45 +0000 (09:35 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 29 Mar 2018 14:42:08 +0000 (11:42 -0300)
commita7e46047cffbca02d08049729911a274970244f5
tree2c7669e5761467c04cb0a72f744a845603a130e4
parent87dc9b0ac1db2b689385a5b65e7d1293ea8bca0a
Bug 19784: Adapt /v1/patrons to new naming guidelines

This patch introduces two functions to the patrons endpoint:
- _to_api
- _to_model

This are in charge of field mappings in order to comply with the
guidelines.

Koha::REST::V1:Auth is adjusted to handle 'patron_id' as well. 'borrowernumber'
handling is kept until the existing endpoints get updated.

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/REST/V1/Auth.pm
Koha/REST/V1/Patrons.pm
api/v1/swagger/definitions/patron.json
api/v1/swagger/parameters.json
api/v1/swagger/parameters/patron.json
api/v1/swagger/paths.json
api/v1/swagger/paths/patrons.json
api/v1/swagger/x-primitives.json