OVPAY-879 - Added schemas for Failures v2.

This commit is contained in:
Bas Boterman 2024-12-24 13:27:22 +01:00
parent 8111b631f3
commit 4ed63a75bf

View File

@ -216,43 +216,14 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"department": "900",
"costCenter": "84955",
"costType": "619031",
"documentDate": "2022-01-01",
"documentCode": "VERK_FACTUUR",
"accountingPeriod": "2024/10",
"transactionDescription": "Dagkaart",
"contraAccountNumber": "220.10419",
"status": "open",
"occurence": 1,
"processingFailureInstances":
[
{
"processingFailureInstanceId": "9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a",
"processingFailureId": "c93a5b6a-5b6a-4b0a-9c9e-4b0a5b6a4b0a",
"timestamp": "2022-01-01 00:00:00",
"failureReason": "122be602-139d-49f5-b34f-1e3e2de29408",
"element": "costCenter",
"occurence": 1,
"change": "Adapt config",
},
],
}
$ref: "#/components/schemas/ProcessingFailuresPostRequestBody"
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"processingFailureId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d",
}
$ref: "#/components/schemas/ProcessingFailuresPostResponseBody"
/transactionitems/{transactionItemId}/transactionaudittrails:
parameters:
- in: path
@ -482,45 +453,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"processingFailures":
[
{
"processingFailureId": "37a8095b-19db-498f-9349-5f37d21c5bdf",
"transactionItemId": "000dd413-2d19-47c0-a9db-9efbb6bc39a2",
"department": "900",
"costCenter": "84955",
"costType": "619031",
"documentDate": "2022-01-01",
"documentCode": "VERK_FACTUUR",
"accountingPeriod": "2024/10",
"transactionDescription": "Dagkaart",
"contraAccountNumber": "220.10419",
"status": "open",
"occurence": 1,
"processingFailureInstances":
[
{
"processingFailureInstanceId": "9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a",
"processingFailureId": "c93a5b6a-5b6a-4b0a-9c9e-4b0a5b6a4b0a",
"timestamp": "2022-01-01 00:00:00",
"failureReason":
{
"failureReasonId": 12,
"reasonCode": "1234ABCD",
"reasonDesc": "description",
},
"element": "costCenter",
"occurence": 1,
"change": "Adapt config",
},
],
},
],
"href": null,
}
$ref: "#/components/schemas/ProcessingFailuresGetResponseBody"
/processingfailures/{processingFailureId}:
parameters:
- in: path
@ -540,19 +473,14 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example: { "status": "open", "occurence": 2 }
$ref: "#/components/schemas/ProcessingFailuresPatchRequestBody"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"processingFailureId": "37a8095b-19db-498f-9349-5f37d21c5bdf",
}
$ref: "#/components/schemas/ProcessingFailuresPatchResponseBody"
/processingfailures/{processingFailureId}/processingfailureinstances:
parameters:
- in: path
@ -572,26 +500,14 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"timestamp": "2022-01-01 00:00:00",
"failureReasonId": 12,
"element": "costCenter",
"occurence": 1,
"change": "Adapt config",
}
$ref: "#/components/schemas/ProcessingFailureInstancesPostRequestBody"
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"processingFailureInstanceId": "9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a",
}
$ref: "#/components/schemas/ProcessingFailureInstancesPostResponseBody"
/processingfailureinstances/{processingFailureInstanceId}:
parameters:
- in: path
@ -611,24 +527,14 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"timestamp": "2022-01-01 00:00:00",
"occurence": 2,
"change": "Adapt config",
}
$ref: "#/components/schemas/ProcessingFailureInstancesPatchRequestBody"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"processingFailureInstanceId": "37a8095b-19db-498f-9349-5f37d21c5bdf",
}
$ref: "#/components/schemas/ProcessingFailureInstancesPatchResponseBody"
/productmetadata:
get:
summary: Find product metadata.
@ -2065,7 +1971,7 @@ components:
type: object
properties:
transactionItems:
type: "array"
type: array
items:
type: object
properties:
@ -2092,13 +1998,13 @@ components:
type: string
example: V21
amountExclTax:
type: number
type: integer
example: 100
amountInclTax:
type: number
type: integer
example: 121
amountTax:
type: number
type: integer
example: 21
occurredOn:
type: string
@ -2293,6 +2199,270 @@ components:
example: afce35b2-1dff-4ace-98d0-4b9ac405c87d
required:
- transactionItemId
ProcessingFailuresPostRequestBody:
type: object
properties:
department:
type: string
nullable: true
example: 900
costCenter:
type: string
nullable: true
example: 84955
costType:
type: string
nullable: true
example: 619031
documentDate:
type: string
format: date
nullable: true
example: 2022-01-01
documentCode:
type: string
nullable: true
example: VERK_FACTUUR
accountingPeriod:
type: string
nullable: true
example: 2024/10
transactionDescription:
type: string
nullable: true
example: Dagkaart
contraAccountNumber:
type: string
nullable: true
example: 220.10419
status:
type: string
enum:
- open
- returned to trx-db
- returned to src
example: open
occurence:
type: integer
example: 1
processingFailureInstances:
type: array
items:
$ref: "#/components/schemas/ProcessingFailureInstancesPostRequestBody"
required:
- status
- occurence
- processingFailureInstances
ProcessingFailuresPostResponseBody:
type: object
properties:
processingFailureId:
type: string
format: uuid
example: 37a8095b-19db-498f-9349-5f37d21c5bdf
required:
- processingFailureId
ProcessingFailuresGetResponseBody:
type: object
properties:
processingFailures:
type: array
items:
type: object
properties:
processingFailureId:
type: string
format: uuid
example: 37a8095b-19db-498f-9349-5f37d21c5bdf
transactionItemId:
type: string
format: uuid
example: 2d77d978-7141-499a-84ad-93fad8ee03ce
department:
type: string
nullable: true
example: 900
costCenter:
type: string
nullable: true
example: 84955
costType:
type: string
nullable: true
example: 619031
documentDate:
type: string
format: date
nullable: true
example: 2022-01-01
documentCode:
type: string
nullable: true
example: VERK_FACTUUR
accountingPeriod:
type: string
nullable: true
example: 2024/10
transactionDescription:
type: string
nullable: true
example: Dagkaart
contraAccountNumber:
type: string
nullable: true
example: 220.10419
status:
type: string
enum:
- open
- returned to trx-db
- returned to src
example: open
occurence:
type: integer
example: 1
processingFailureInstances:
type: array
items:
type: object
properties:
processingFailureInstanceId:
type: string
format: uuid
example: 9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a
timestamp:
type: string
format: date-time
example: 2022-01-01 00:00:00
failureReason:
type: object
properties:
failureReasonId:
type: integer
example: 1
reasonCode:
type: string
example: 002
reasonDesc:
type: string
example: Contra account does not exist
required:
- failureReasonId
- reasonCode
- reasonDesc
element:
type: string
example: costCenter
occurence:
type: integer
example: 1
change:
type: string
nullable: true
example: Adapt config
required:
- processingFailureInstanceId
- timestamp
- failureReason
- element
- occurence
required:
- processingFailureId
- transactionItemId
- status
- occurence
- processingFailureInstances
href:
type: string
nullable: true
description: URI for pagination.
example: null
ProcessingFailuresPatchRequestBody:
type: object
properties:
status:
type: string
enum:
- open
- returned to trx-db
- returned to src
nullable: true
example: returned to trx-db
occurence:
type: integer
nullable: true
example: 2
ProcessingFailuresPatchResponseBody:
type: object
properties:
processingFailureId:
type: string
format: uuid
nullable: false
example: 37a8095b-19db-498f-9349-5f37d21c5bdf
required:
- processingFailureId
ProcessingFailureInstancesPostRequestBody:
type: object
properties:
timestamp:
type: string
format: date-time
example: 2022-01-01 00:00:00
failureReasonId:
type: integer
example: 1
element:
type: string
example: costCenter
occurence:
type: integer
example: 1
change:
type: string
nullable: true
example: Adapt config
required:
- timestamp
- failureReason
- element
- occurence
ProcessingFailureInstancesPostResponseBody:
type: object
properties:
processingFailureInstanceId:
type: string
format: uuid
nullable: false
example: 37a8095b-19db-498f-9349-5f37d21c5bdf
required:
- processingFailureInstanceId
ProcessingFailureInstancesPatchRequestBody:
type: object
properties:
timestamp:
type: string
format: date-time
nullable: true
example: 2022-01-01 00:00:00
occurence:
type: integer
nullable: true
example: 1
change:
type: string
nullable: true
example: Adapt config
ProcessingFailureInstancesPatchResponseBody:
type: object
properties:
processingFailureInstanceId:
type: string
format: uuid
nullable: false
example: 37a8095b-19db-498f-9349-5f37d21c5bdf
required:
- processingFailureInstanceId
rfc9457:
type: object
properties: