hs.hsadmin.ng/src/main/resources/api-definition/hs-office/hs-office-coopassets-schemas.yaml

93 lines
3.1 KiB
YAML
Raw Normal View History

components:
schemas:
HsOfficeCoopAssetsTransactionType:
type: string
enum:
2024-11-12 20:01:04 +01:00
- ADJUSTMENT # FIXME: rename to REVERSAL
- DEPOSIT
- DISBURSAL
- TRANSFER
- ADOPTION
- CLEARING
- LOSS
HsOfficeCoopAssetsTransaction:
type: object
properties:
uuid:
type: string
format: uuid
transactionType:
$ref: '#/components/schemas/HsOfficeCoopAssetsTransactionType'
assetValue:
type: number
format: currency
valueDate:
type: string
format: date
reference:
type: string
comment:
type: string
2024-11-12 20:01:04 +01:00
adjustedAssetTx: # FIXME: rename to revertedAssetTx
$ref: '#/components/schemas/HsOfficeReferencedCoopAssetsTransaction'
2024-11-12 20:01:04 +01:00
adjustmentAssetTx: # FIXME: rename to reversalAssetTx
$ref: '#/components/schemas/HsOfficeReferencedCoopAssetsTransaction'
HsOfficeReferencedCoopAssetsTransaction:
description:
Similar to `HsOfficeCoopAssetsTransaction` but without the self-referencing properties
(`adjustedAssetTx` and `adjustmentAssetTx`), to avoid recursive JSON.
type: object
properties:
uuid:
type: string
format: uuid
transactionType:
$ref: '#/components/schemas/HsOfficeCoopAssetsTransactionType'
assetValue:
type: number
format: currency
valueDate:
type: string
format: date
reference:
type: string
comment:
type: string
HsOfficeCoopAssetsTransactionInsert:
type: object
properties:
membership.uuid:
type: string
format: uuid
nullable: false
transactionType:
$ref: '#/components/schemas/HsOfficeCoopAssetsTransactionType'
assetValue:
type: number
format: currency
valueDate:
type: string
format: date
reference:
type: string
minLength: 6
maxLength: 48
comment:
type: string
2024-11-12 20:01:04 +01:00
reverseEntry.uuid: # FIXME: rename to revertedAssetTx
type: string
format: uuid
required:
- membership.uuid
- transactionType
- assetValue
- valueDate
- reference
additionalProperties: false