Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add SmartContract schema #7

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/openapi/components/schemas/SmartContract.yaml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions docs/openapi/requests/CreateBlockchainRecord.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions docs/openapi/responses/BlockchainRecordCreated.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
properties:
RecordStatus:
description: Result of record of data in the blockchain
type: boolean