From ebe70cba6d28be907c8e996548a8a0afe5dc8f21 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Mon, 9 Sep 2024 17:04:40 +0200 Subject: [PATCH] OVPAY-1040 - Processed review remarks from Andre. --- src/openapi/util/util-crud.yaml | 150 ++++++++++++++++++++------------ 1 file changed, 93 insertions(+), 57 deletions(-) diff --git a/src/openapi/util/util-crud.yaml b/src/openapi/util/util-crud.yaml index 9d54722..6788888 100644 --- a/src/openapi/util/util-crud.yaml +++ b/src/openapi/util/util-crud.yaml @@ -47,30 +47,6 @@ paths: example: 2024-07-02 15:01:00.000 required: false description: Execution timestmap (until). - - in: query - name: contractId - schema: - type: string - format: uuid - example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf - required: false - description: ContractId of the action to perform. - - in: query - name: orderId - schema: - type: string - format: uuid - example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf - required: false - description: OrderId of the action to perform. - - in: query - name: orderLineId - schema: - type: string - format: uuid - example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf - required: false - description: OrderLineId of the action to perform. - in: query name: createdFrom schema: @@ -110,6 +86,20 @@ paths: example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf required: false description: Pointer to executor of this action (e.g. the batch job). + - in: query + name: resourceName + schema: + type: string + example: contracts + required: false + description: Name of the resource concerning the scheduled action. + - in: query + name: resourceIdentifier + schema: + type: string + example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf + required: false + description: Id of the resource concerning the scheduled action. responses: "200": description: OK @@ -128,14 +118,20 @@ paths: "scheduledActionStatus": { "scheduledActionStatusId": 1, "name": "created" }, "executionTime": "2024-07-02 15:01:00.000", - "contractId": "e911532c-8049-4068-955d-6d1230321cba", - "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", - "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", - "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", - "result": "{ \"result\": \"\", \"timestamp\": \"\" }", + "details": '{ "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" }', + "result": '{ "result": "", "timestamp": "" }', "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", + "scheduledActionResources": + [ + { + "scheduledActionResourceId": "7e4b7d7a-4266-47c5-b482-f1a00379c493", + "resourceName": + { "resourceNameId": 1, "name": "contracts" }, + "resourceIdentifier": "70d29a0a-176d-4184-8cba-08416eccb361", + }, + ], }, ], } @@ -156,14 +152,18 @@ paths: "scheduledActionType": 1, "scheduledActionStatus": 1, "executionTime": "2024-07-02 15:01:00.000", - "contractId": "e911532c-8049-4068-955d-6d1230321cba", - "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", - "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", - "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", - "result": "{ \"result\": \"\", \"timestamp\": \"\" }", + "details": '{ "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" }', + "result": '{ "result": "", "timestamp": "" }', "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", + "scheduledActionResources": + [ + { + "resourceNameId": 1, + "resourceIdentifier": "70d29a0a-176d-4184-8cba-08416eccb361", + }, + ], }, } responses: @@ -212,14 +212,20 @@ paths: "scheduledActionStatus": { "scheduledActionStatusId": 1, "name": "created" }, "executionTime": "2024-07-02 15:01:00.000", - "contractId": "e911532c-8049-4068-955d-6d1230321cba", - "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", - "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", - "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", - "result": "{ \"result\": \"\", \"timestamp\": \"\" }", + "details": '{ "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" }', + "result": '{ "result": "", "timestamp": "" }', "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", + "scheduledActionResources": + [ + { + "scheduledActionResourceId": "7e4b7d7a-4266-47c5-b482-f1a00379c493", + "resourceName": + { "resourceNameId": 1, "name": "contracts" }, + "resourceIdentifier": "70d29a0a-176d-4184-8cba-08416eccb361", + }, + ], }, } patch: @@ -238,8 +244,8 @@ paths: { "scheduledActionStatus": 1, "executionTime": "2024-07-02 15:01:00.000", - "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", - "result": "{ \"result\": \"\", \"timestamp\": \"\" }", + "details": '{ "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" }', + "result": '{ "result": "", "timestamp": "" }', "updated": "2024-07-02 15:01:00.000", "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", }, @@ -293,9 +299,7 @@ paths: example: { "scheduledActionTypes": - [ - { "scheduledActionTypeId": 1, "name": "gbo-refund" }, - ], + [{ "scheduledActionTypeId": 1, "name": "gbo-refund" }], } /scheduledactionstatuses: get: @@ -320,6 +324,27 @@ paths: { "scheduledActionStatusId": 4, "name": "failed" }, ], } + /resourcenames: + get: + summary: Return a list of all possible values of the ResourceName reference table. Used for populating drop down lists for example. + description: Return a list of all possible values of the ResourceName reference table. Used for populating drop down lists for example. + tags: + - Reference Tables + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceName" + example: + { + "resourceNames": + [ + { "resourceNameId": 1, "name": "contracts" }, + { "resourceNameId": 2, "name": "orders" }, + ], + } components: securitySchemes: bearerToken: @@ -344,22 +369,11 @@ components: type: string format: date-time example: 2024-07-02 15:01:00.000 - contractId: - type: string - format: uuid - example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f - orderId: - type: string - format: uuid - example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f - orderLineId: - type: string - format: uuid - example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f details: type: string format: json - example: { "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" } + example: + { "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" } result: type: string format: json @@ -396,3 +410,25 @@ components: type: string enum: [created, pending, processed, failed] example: created + ScheduledActionResource: + type: object + properties: + scheduledActionResourceId: + type: string + format: uuid + example: 70d29a0a-176d-4184-8cba-08416eccb361 + resourceName: + type: object + $ref: "#/components/schemas/ResourceName" + resourceIdentifier: + type: string + example: 70d29a0a-176d-4184-8cba-08416eccb361 + ResourceName: + type: object + properties: + resourceNameId: + type: integer + example: 1 + name: + type: string + example: contracts