Co-authored-by: Michael Hoennig <michael@hoennig.de> Reviewed-on: #120 Reviewed-by: Marc Sandlus <marc.sandlus@hostsharing.net>
86 lines
2.7 KiB
YAML
86 lines
2.7 KiB
YAML
|
|
components:
|
|
|
|
schemas:
|
|
|
|
HsOfficeCoopSharesTransactionType:
|
|
type: string
|
|
enum:
|
|
- ADJUSTMENT
|
|
- SUBSCRIPTION
|
|
- CANCELLATION
|
|
|
|
HsOfficeCoopSharesTransaction:
|
|
type: object
|
|
properties:
|
|
uuid:
|
|
type: string
|
|
format: uuid
|
|
transactionType:
|
|
$ref: '#/components/schemas/HsOfficeCoopSharesTransactionType'
|
|
shareCount:
|
|
type: integer
|
|
valueDate:
|
|
type: string
|
|
format: date
|
|
reference:
|
|
type: string
|
|
comment:
|
|
type: string
|
|
adjustedShareTx:
|
|
$ref: '#/components/schemas/HsOfficeReferencedCoopSharesTransaction'
|
|
adjustmentShareTx:
|
|
$ref: '#/components/schemas/HsOfficeReferencedCoopSharesTransaction'
|
|
|
|
HsOfficeReferencedCoopSharesTransaction:
|
|
description:
|
|
Similar to `HsOfficeCoopSharesTransaction` but without the self-referencing properties
|
|
(`adjustedShareTx` and `adjustmentShareTx`), to avoid recursive JSON.
|
|
type: object
|
|
properties:
|
|
uuid:
|
|
type: string
|
|
format: uuid
|
|
transactionType:
|
|
$ref: '#/components/schemas/HsOfficeCoopSharesTransactionType'
|
|
shareCount:
|
|
type: integer
|
|
valueDate:
|
|
type: string
|
|
format: date
|
|
reference:
|
|
type: string
|
|
comment:
|
|
type: string
|
|
|
|
HsOfficeCoopSharesTransactionInsert:
|
|
type: object
|
|
properties:
|
|
membership.uuid:
|
|
type: string
|
|
format: uuid
|
|
nullable: false
|
|
transactionType:
|
|
$ref: '#/components/schemas/HsOfficeCoopSharesTransactionType'
|
|
shareCount:
|
|
type: integer
|
|
valueDate:
|
|
type: string
|
|
format: date
|
|
reference:
|
|
type: string
|
|
minLength: 6
|
|
maxLength: 48
|
|
comment:
|
|
type: string
|
|
adjustedShareTx.uuid:
|
|
type: string
|
|
format: uuid
|
|
required:
|
|
- membership.uuid
|
|
- transactionType
|
|
- shareCount
|
|
- valueDate
|
|
- reference
|
|
additionalProperties: false
|