From 4ed63a75bfc150885fe584c638b9dbb94a55215d Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 24 Dec 2024 13:27:22 +0100 Subject: [PATCH] OVPAY-879 - Added schemas for Failures v2. --- src/openapi/fiko/fiko-crud.yaml | 462 ++++++++++++++++++++++---------- 1 file changed, 316 insertions(+), 146 deletions(-) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index 27dbd5b..887bb4e 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -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. @@ -2064,60 +1970,60 @@ components: TransactionItemsGetResponseBody: type: object properties: - transactionItems: - type: "array" + transactionItems: + type: array items: type: object properties: - transactionItemId: + transactionItemId: type: string example: afce35b2-1dff-4ace-98d0-4b9ac405c87d - sourceName: + sourceName: type: string example: Verkoopengine - transactionId: + transactionId: type: string example: 1001236 - transactionLineId: + transactionLineId: type: string nullable: true example: 1 - name: + name: type: string example: HTM Maandkorting 20% - quantity: + quantity: type: integer example: 1 - taxCode: + taxCode: type: string example: V21 - amountExclTax: - type: number + amountExclTax: + type: integer example: 100 - amountInclTax: - type: number + amountInclTax: + type: integer example: 121 - amountTax: - type: number + amountTax: + type: integer example: 21 - occurredOn: + occurredOn: type: string format: date-time example: 2024-10-04T00:00:00Z - type: + type: type: string enum: - debit - credit example: debit - productCode: + productCode: type: string example: HTM-MND-20 - aggregationReference: + aggregationReference: type: string nullable: true example: FIKO-123456 - accountingSystemReference: + accountingSystemReference: type: string nullable: true example: U4F-123456 @@ -2142,45 +2048,45 @@ components: TransactionItemsPostRequestBody: type: object properties: - sourceName: + sourceName: type: string example: Verkoopengine - transactionId: + transactionId: type: string example: 1001236 - transactionLineId: + transactionLineId: type: string nullable: true example: 1 - name: + name: type: string example: HTM Maandkorting 20% - quantity: + quantity: type: integer example: 1 - taxCode: + taxCode: type: string example: V21 - amountExclTax: + amountExclTax: type: integer example: 100 - amountInclTax: + amountInclTax: type: integer example: 121 - amountTax: + amountTax: type: integer example: 21 - occurredOn: + occurredOn: type: string format: date-time example: 2024-10-04T00:00:00Z - type: + type: type: string enum: - debit - credit example: debit - productCode: + productCode: type: string example: HTM-MND-20 required: @@ -2211,45 +2117,45 @@ components: items: type: object properties: - sourceName: + sourceName: type: string example: Verkoopengine - transactionId: + transactionId: type: string example: 1001236 - transactionLineId: + transactionLineId: type: string nullable: true example: 1 - name: + name: type: string example: HTM Maandkorting 20% - quantity: + quantity: type: integer example: 1 - taxCode: + taxCode: type: string example: V21 - amountExclTax: + amountExclTax: type: integer example: 100 - amountInclTax: + amountInclTax: type: integer example: 121 amountTax: type: integer example: 21 - occurredOn: + occurredOn: type: string format: date-time example: 2024-10-04T00:00:00Z - type: + type: type: string enum: - debit - credit example: debit - productCode: + productCode: type: string example: HTM-MND-20 required: @@ -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: