]> 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)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 26 Apr 2024 16:06:10 +0000 (18:06 +0200)
commitee52b5c252c4fc5defadc28922c422ffd85b1877
tree716e52691446ae50add2497b0c559dfb8970ce22
parentafd83c134e2ef4759d0512f713d4f4911f0190f0
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>
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