]> git.koha-community.org Git - koha.git/commit
Bug 36481: Add GET /libraries/:library_id/cash_registers
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 1 Apr 2024 20:52:46 +0000 (20:52 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 24 May 2024 08:12:53 +0000 (10:12 +0200)
commit0f82d31f3bdf0c1c6abe78f889896d61f5fae848
tree5b1ad70877f5ca6ac62d660c57eb66aca56632f2
parente27cb37de7f062439fa54ce1b1aca9405dc9747f
Bug 36481: Add GET /libraries/:library_id/cash_registers

This patch adds the mentioned route. For the task it:

* Adds Koha::Cash::Register->to_api_mapping with trivial mappings
* Adds a cash_register object definition on the API spec
* Adds a controller to handle requests
* Adds tests for the new endpoint

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ qa
=> SUCCESS: All green! Tests pass!
3. Play with Postman!
4. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ee52b5c252c4fc5defadc28922c422ffd85b1877)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Cash/Register.pm
Koha/REST/V1/Libraries.pm
api/v1/swagger/definitions/cash_register.yaml [new file with mode: 0644]
api/v1/swagger/paths/libraries.yaml
api/v1/swagger/swagger.yaml
t/db_dependent/api/v1/libraries.t