Koha/api/v1/swagger/definitions/cash_register.yaml
Tomas Cohen Arazi ee52b5c252
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>
2024-04-26 18:06:10 +02:00

33 lines
754 B
YAML

---
type: object
properties:
cash_register_id:
type: integer
description: Internal cash register identifier
name:
type: string
description: The cash register display name
library_id:
type: string
description: Internally assigned library identifier
maxLength: 10
minLength: 1
description:
type: string
description: A description
starting_float:
type:
- number
- "null"
description: The starting float this account register should be assigned
archived:
type: boolean
description: If this till is archived
branch_default:
type: boolean
description: If this till is the branch default
additionalProperties: false
required:
- cash_register_id
- name
- library_id