From 2ce7e9da7cd64cec68d8a09a72b7a765211df293 Mon Sep 17 00:00:00 2001 From: luizbweb Date: Tue, 4 Feb 2025 20:04:09 -0300 Subject: [PATCH 1/3] add SmartContract schema --- .../components/schemas/SmartContract.yaml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docs/openapi/components/schemas/SmartContract.yaml diff --git a/docs/openapi/components/schemas/SmartContract.yaml b/docs/openapi/components/schemas/SmartContract.yaml new file mode 100644 index 0000000..621dc95 --- /dev/null +++ b/docs/openapi/components/schemas/SmartContract.yaml @@ -0,0 +1,24 @@ +type: object +properties: + eventName: + description: Full event name + type: string + minLength: 5 + example: 82ยบ Python Floripa + eventTime: + description: Date and Time of the registration + type: string + format: date-time + example: 2025-02-04T22:32:22 + eventLocation: + description: Latitude and longitude of the event location + type: array + items: + type: number + minItems: 2 + example: [37.24310, 115.79300] + fileHash: + description: Hash of the final certificate file + type: string + minLength: 19 + example: 1291272085159665688 From a901d13bae45f807be982e36fbe024cae1adb964 Mon Sep 17 00:00:00 2001 From: luizbweb Date: Tue, 4 Feb 2025 20:48:47 -0300 Subject: [PATCH 2/3] add Create Blockchain Record yaml --- .../openapi/requests/CreateBlockchainRecord.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docs/openapi/requests/CreateBlockchainRecord.yaml diff --git a/docs/openapi/requests/CreateBlockchainRecord.yaml b/docs/openapi/requests/CreateBlockchainRecord.yaml new file mode 100644 index 0000000..d7daa9b --- /dev/null +++ b/docs/openapi/requests/CreateBlockchainRecord.yaml @@ -0,0 +1,16 @@ +type: object +title: Blockchain Record +description: Make a Blockchain Record with SmartContract +required: + - eventName + - eventTime + - fileHash +allOf: + - $ref: ../components/schemas/SmartContract.yaml +properties: + action: + type: string + enum: + - StartMakeRecord + format: text + description: Action to be performed From bdeaa653dfc2533c56f6c47495be8aaddfc10070 Mon Sep 17 00:00:00 2001 From: luizbweb Date: Tue, 4 Feb 2025 21:02:35 -0300 Subject: [PATCH 3/3] add blockchain response docs --- docs/openapi/responses/BlockchainRecordCreated.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 docs/openapi/responses/BlockchainRecordCreated.yaml diff --git a/docs/openapi/responses/BlockchainRecordCreated.yaml b/docs/openapi/responses/BlockchainRecordCreated.yaml new file mode 100644 index 0000000..0b4c11f --- /dev/null +++ b/docs/openapi/responses/BlockchainRecordCreated.yaml @@ -0,0 +1,4 @@ +properties: + RecordStatus: + description: Result of record of data in the blockchain + type: boolean