minor updates
This commit is contained in:
294
api.yml
294
api.yml
@@ -105,63 +105,7 @@ paths:
|
||||
description: Old password incorrect
|
||||
'404':
|
||||
description: client_id not found
|
||||
/Client:
|
||||
post:
|
||||
tags:
|
||||
- client
|
||||
summary: Add a new client
|
||||
description: Add a new client to the system
|
||||
operationId: manager.add_client
|
||||
parameters:
|
||||
- name: name
|
||||
in: query
|
||||
description: Client Name
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: birthdate
|
||||
in: query
|
||||
description: Client Birthdate (dd-mm-yyyy)
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: address
|
||||
in: query
|
||||
description: Client Address
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
- name: phone_number
|
||||
in: query
|
||||
description: Client Phone Number
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: email
|
||||
in: query
|
||||
description: Client Email Address
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: password
|
||||
in: query
|
||||
description: Client Password
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: notes
|
||||
in: query
|
||||
description: Notes about client
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: "Client created"
|
||||
'400':
|
||||
description: Invalid input
|
||||
'422':
|
||||
description: Validation exception
|
||||
/Client/Client:
|
||||
put:
|
||||
tags:
|
||||
- client
|
||||
@@ -240,27 +184,6 @@ paths:
|
||||
description: Invalid Client ID supplied
|
||||
'404':
|
||||
description: Client not found
|
||||
delete:
|
||||
tags:
|
||||
- client
|
||||
summary: Delete a client by ID
|
||||
description: Delete a client by ID
|
||||
operationId: manager.delete_client
|
||||
parameters:
|
||||
- name: client_id
|
||||
in: query
|
||||
description: ID of client to delete
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: int32
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
'400':
|
||||
description: Invalid Client ID supplied
|
||||
'404':
|
||||
description: Client not found
|
||||
/Account:
|
||||
post:
|
||||
tags:
|
||||
@@ -361,27 +284,6 @@ paths:
|
||||
description: Invalid Account ID supplied
|
||||
'404':
|
||||
description: Account not found
|
||||
delete:
|
||||
tags:
|
||||
- account
|
||||
summary: Delete an account by ID
|
||||
description: Delete an account by ID
|
||||
operationId: manager.delete_account
|
||||
parameters:
|
||||
- name: account_id
|
||||
in: query
|
||||
description: ID of account to delete
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: int32
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
'400':
|
||||
description: Invalid account_id supplied
|
||||
'404':
|
||||
description: Account not found
|
||||
/Transaction:
|
||||
get:
|
||||
tags:
|
||||
@@ -473,7 +375,7 @@ paths:
|
||||
description: Invalid input
|
||||
'404':
|
||||
description: No transactions found
|
||||
/Manager/Interest:
|
||||
/Admin/Interest:
|
||||
post:
|
||||
tags:
|
||||
- admin
|
||||
@@ -522,7 +424,7 @@ paths:
|
||||
description: Invalid input
|
||||
'422':
|
||||
description: Validation exception
|
||||
/Manager/Clients:
|
||||
/Admin/Clients:
|
||||
get:
|
||||
tags:
|
||||
- admin
|
||||
@@ -540,7 +442,7 @@ paths:
|
||||
description: Invalid input
|
||||
'404':
|
||||
description: No clients found
|
||||
/Manager/Accounts:
|
||||
/Admin/Accounts:
|
||||
get:
|
||||
tags:
|
||||
- admin
|
||||
@@ -558,7 +460,7 @@ paths:
|
||||
description: Invalid input
|
||||
'404':
|
||||
description: No accounts found
|
||||
/Manager/Transactions:
|
||||
/Admin/Transactions:
|
||||
get:
|
||||
tags:
|
||||
- admin
|
||||
@@ -576,7 +478,7 @@ paths:
|
||||
description: Invalid input
|
||||
'404':
|
||||
description: No transactions found
|
||||
/Manager/Hash:
|
||||
/System/Hash:
|
||||
get:
|
||||
tags:
|
||||
- system
|
||||
@@ -600,8 +502,8 @@ paths:
|
||||
'400':
|
||||
description: Invalid input
|
||||
'401':
|
||||
description: Unauthorized
|
||||
/Manager/Timestamp:
|
||||
description: Unauthorised
|
||||
/System/Timestamp:
|
||||
get:
|
||||
tags:
|
||||
- system
|
||||
@@ -618,7 +520,185 @@ paths:
|
||||
'400':
|
||||
description: Invalid input
|
||||
'401':
|
||||
description: Unauthorized
|
||||
description: Unauthorised
|
||||
/Admin/Balance:
|
||||
get:
|
||||
tags:
|
||||
- admin
|
||||
summary: Test the balance of all accounts
|
||||
description: Tests the balance of all accounts and alerts of any discrepancies
|
||||
operationId: manager.test_account_balances
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
'401':
|
||||
description: Unauthorised
|
||||
/System/Initialise:
|
||||
get:
|
||||
tags:
|
||||
- system
|
||||
summary: Initialise the system
|
||||
description: Initialises the system with test data
|
||||
operationId: manager.initialise_database
|
||||
parameters:
|
||||
- name: password
|
||||
in: query
|
||||
description: Password to initialise the system
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
'400':
|
||||
description: Database not empty, this function cannot be used
|
||||
/Admin/Promote:
|
||||
put:
|
||||
tags:
|
||||
- admin
|
||||
summary: Promote a client to administrator
|
||||
description: Promote a client to administrator
|
||||
operationId: manager.promote_to_admin
|
||||
parameters:
|
||||
- name: client_id
|
||||
in: query
|
||||
description: ID of client to promote
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
'401':
|
||||
description: Unauthorised
|
||||
'404':
|
||||
description: Client not found
|
||||
/Admin/Demote:
|
||||
put:
|
||||
tags:
|
||||
- admin
|
||||
summary: Demote a client from administrator
|
||||
description: Demote a client from administrator
|
||||
operationId: manager.demote_from_admin
|
||||
parameters:
|
||||
- name: client_id
|
||||
in: query
|
||||
description: ID of client to demote
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
'401':
|
||||
description: Unauthorised
|
||||
'404':
|
||||
description: Client not found
|
||||
/Admin/Client:
|
||||
post:
|
||||
tags:
|
||||
- admin
|
||||
summary: Add a new client
|
||||
description: Add a new client to the system
|
||||
operationId: manager.add_client
|
||||
parameters:
|
||||
- name: name
|
||||
in: query
|
||||
description: Client Name
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: birthdate
|
||||
in: query
|
||||
description: Client Birthdate (dd-mm-yyyy)
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: address
|
||||
in: query
|
||||
description: Client Address
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
- name: phone_number
|
||||
in: query
|
||||
description: Client Phone Number
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: email
|
||||
in: query
|
||||
description: Client Email Address
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: password
|
||||
in: query
|
||||
description: Client Password
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: notes
|
||||
in: query
|
||||
description: Notes about client
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: "Client created"
|
||||
'400':
|
||||
description: Invalid input
|
||||
'422':
|
||||
description: Validation exception
|
||||
/Delete/Client:
|
||||
delete:
|
||||
tags:
|
||||
- admin
|
||||
summary: Delete a client by ID
|
||||
description: Delete a client by ID
|
||||
operationId: manager.delete_client
|
||||
parameters:
|
||||
- name: client_id
|
||||
in: query
|
||||
description: ID of client to delete
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: int32
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
'400':
|
||||
description: Invalid Client ID supplied
|
||||
'404':
|
||||
description: Client not found
|
||||
/Delete/Account:
|
||||
delete:
|
||||
tags:
|
||||
- admin
|
||||
summary: Delete an account by ID
|
||||
description: Delete an account by ID
|
||||
operationId: manager.delete_account
|
||||
parameters:
|
||||
- name: account_id
|
||||
in: query
|
||||
description: ID of account to delete
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: int32
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
'400':
|
||||
description: Invalid account_id supplied
|
||||
'404':
|
||||
description: Account not found
|
||||
components:
|
||||
schemas:
|
||||
Client:
|
||||
|
||||
Reference in New Issue
Block a user