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 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 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