minor change

This commit is contained in:
Lucas Mathews
2024-05-25 19:41:52 +02:00
parent e62a2f3deb
commit c1e0674087
2 changed files with 32 additions and 40 deletions

69
api.yml
View File

@@ -351,7 +351,7 @@ paths:
required: true required: true
schema: schema:
type: integer type: integer
format: int32 format: float
- name: account_id - name: account_id
in: query in: query
description: Account number the money paid from description: Account number the money paid from
@@ -466,7 +466,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/Client' $ref: '#/components/schemas/ApiResponse'
'400': '400':
description: Invalid input description: Invalid input
'404': '404':
@@ -484,7 +484,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/Account' $ref: '#/components/schemas/ApiResponse'
'400': '400':
description: Invalid input description: Invalid input
'404': '404':
@@ -704,7 +704,6 @@ paths:
required: true required: true
schema: schema:
type: string type: string
format: int32
responses: responses:
'200': '200':
description: Successful operation description: Successful operation
@@ -726,7 +725,6 @@ paths:
required: true required: true
schema: schema:
type: string type: string
format: int32
responses: responses:
'200': '200':
description: Successful operation description: Successful operation
@@ -736,12 +734,24 @@ paths:
description: Account not found description: Account not found
components: components:
schemas: schemas:
ApiResponse:
type: object
properties:
success:
type: boolean
message:
type: string
data:
type: object
example:
success: true
message: "Success"
data: {}
Client: Client:
type: object type: object
properties: properties:
client_id: client_id:
type: integer type: string
format: int32
name: name:
type: string type: string
birthdate: birthdate:
@@ -754,32 +764,19 @@ components:
type: string type: string
email: email:
type: string type: string
password:
type: string
notes:
type: string
enabled:
type: boolean
administator:
type: boolean
example: example:
client_id: 1 client_id: "896d4ed8"
name: "Lucas Mathews" name: "Lucas Mathews"
birthdate: "21-05-1980" birthdate: "21-05-1980"
opening_timestamp: "17-04-2022 16:21:12" opening_timestamp: "17-04-2022 16:21:12"
address: "Rachelsmolen 1, 5612MA, Eindhoven" address: "Rachelsmolen 1, 5612MA, Eindhoven"
phone_number: "0612345678" phone_number: "0612345678"
email: "john.d@fontys.nl" email: "john.d@fontys.nl"
password: "password"
notes: "This is a test client"
enabled: true
administator: false
Account: Account:
type: object type: object
properties: properties:
account_id: account_id:
type: integer type: string
format: int32
client_id: client_id:
type: string type: string
decription: decription:
@@ -789,33 +786,25 @@ components:
account_type: account_type:
type: string type: string
balance: balance:
type: number type: integer
enabled: format: float
type: boolean
notes:
type: string
transactons:
type: array
example: example:
account_id: 1 account_id: "63b6e8e8"
client_id: 1 client_id: "896d4ed8"
description: "Savings Account" description: "Savings Account"
opening_timestamp: "17-04-2022 16:21:12" opening_timestamp: "17-04-2022 16:21:12"
account_type: "Rachelsmolen 1, 5612MA, Eindhoven" account_type: Savings Account"
balance: 2314.23 balance: 2314.23
enabled: true
notes: "This is a savings account"
Transaction: Transaction:
type: object type: object
properties: properties:
transaction_id: transaction_id:
type: integer type: string
format: int32
transaction_type: transaction_type:
type: string type: string
amount: amount:
type: integer type: integer
format: int32 format: float
timestamp: timestamp:
type: string type: string
description: description:
@@ -825,11 +814,11 @@ components:
recipient_account_number: recipient_account_number:
type: string type: string
example: example:
transaction_id: 1 transaction_id: "d1c4d836-9418-437f-b21c-5cc03d3fdc33"
transaction_type: "Deposit" transaction_type: "Deposit"
amount: 100.00 amount: 100.00
timestamp: "17-04-2022 16:21:12" timestamp: "17-04-2022 16:21:12"
description: "Deposit to Savings Account" description: "Deposit to Savings Account"
account_id: "NL12ABNA0123456789" account_id: "896d4ed8"
recipient_account_id: "NL12ABNA1234567890" recipient_account_id: "05225f17"

View File

@@ -0,0 +1,3 @@
[server]
ip=0.0.0.0
port=81