Koha/api/v1/swagger/definitions/patron_account_credit.yaml
Tomas Cohen Arazi d6c67eddd3 Bug 29620: Move the OpenAPI spec to YAML format
This patch moves all the REST API spec pieces into YAML.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/*
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2021-12-07 12:33:35 -10:00

36 lines
883 B
YAML

---
type: object
properties:
credit_type:
type: string
description: Type of credit ('CREDIT', 'FORGIVEN', 'LOST_FOUND', 'PAYMENT', 'WRITEOFF' )
amount:
type: number
minimum: 0
description: Credit amount
library_id:
type:
- string
- "null"
description: Internal identifier for the library in which the transaction took place
account_lines_ids:
type: array
items:
type: integer
description: List of account line ids the credit goes against (optional)
payment_type:
type: string
description: Payment type (only applies when credit_type=payment)
date:
type: string
format: date
description: Date the credit was recorded (optional)
description:
type: string
description: Description
note:
type: string
description: Internal note
required:
- amount
additionalProperties: false