diff --git a/m2m-banking-api/account-query-api/target/classes/openapi.yaml b/m2m-banking-api/account-query-api/target/classes/openapi.yaml deleted file mode 100644 index 344ed566183609927723e57bc97646414b7b7065..0000000000000000000000000000000000000000 --- a/m2m-banking-api/account-query-api/target/classes/openapi.yaml +++ /dev/null @@ -1,260 +0,0 @@ -openapi: 3.0.1 -info: - title: Pa165 Project Banking Application Account Query - description: | - Hand-made OpenAPI document. - version: 1.0.0 -servers: - - url: "http://localhost:8080" -tags: - - name: CustomerService - description: Service to be used by customer of bank - - name: SystemService - description: Service to be used by other services of bank - - name: EmployeeService - description: Service to be used by employees of bank -components: - schemas: - TransactionType: - type: string - enum: [ WITHDRAW, DEPOSIT, CREDIT, CROSS_ACCOUNT_PAYMENT, REFUND ] - description: type of transaction - Transaction: - title: A transaction - description: A object representing one transaction - properties: - transactionType: - $ref: "#/components/schemas/TransactionType" - amount: - type: number - description: amount of money in transaction - example: 10 - date: - type: string - description: time when the transaction happened - format: date-time - processId: - type: string - format: uuid - description: id of transaction issued by transaction processor - - Balance: - title: A balance - description: Balance object keeping balance of ones account as well as all transactions that led to it. - required: - - id - properties: - id: - type: string - description: id of account with this balance - example: id1 - amount: - type: number - description: balance of account right now - example: 10 - transactions: - type: array - items: - $ref: '#/components/schemas/Transaction' - description: all transactions of this account in list - - TransactionStatistics: - title: statistics about one type of transaction - properties: - transactionType: - $ref: "#/components/schemas/TransactionType" - amountIn: - type: number - description: amount of money got by this type of transactions - example: 1002 - amountOut: - type: number - description: amount of money spent by this type of transactions - example: 1184 - timesIn: - type: number - description: number of times this type of transaction was used to get money - example: 12 - timesOut: - type: number - description: number of times this type of transaction was used to spend money - example: 13 - avgIn: - type: number - description: average amount of money regarding charging account - example: 120 - avgOut: - type: number - description: average amount of money regarding spending money - example: 14 - - TransactionsReport: - title: statistical report about one account - properties: - totalAmount: - $ref: '#/components/schemas/TransactionStatistics' - depositAmount: - $ref: '#/components/schemas/TransactionStatistics' - withdrawalAmount: - $ref: '#/components/schemas/TransactionStatistics' - crossAccountAmount: - $ref: '#/components/schemas/TransactionStatistics' - creditAmount: - $ref: '#/components/schemas/TransactionStatistics' - -paths: - /balance/new: - post: - tags: - - SystemService - summary: creates a balance - operationId: createBalance - parameters: - - { name: id, in: query, required: true, schema: { type: string }, description: "id of account" } - responses: - "201": - description: OK - - /balance: - delete: - tags: - - SystemService - summary: deletes a balance - operationId: deleteBalance - parameters: - - { name: id, in: query, required: true, schema: { type: string }, description: "id of account" } - responses: - "200": - description: OK - - /balance/add: - post: - tags: - - SystemService - summary: adds transaction to existing balance - operationId: addTransactionToBalance - parameters: - - { name: id, in: query, required: true, schema: { type: string }, description: "id of account" } - - { name: amount, in: query, required: true, schema: { type: number }, description: "amount of money in transaction" } - - { name: processId, in: query, required: true, schema: { type: string, format: uuid }, description: "id of process which this transaction is part of" } - - { name: type, in: query, required: true, schema: { $ref: "#/components/schemas/TransactionType" }, description: "type of transaction" } - responses: - "200": - description: OK - "400": - description: NOK - content: - application/json: - schema: - type: string - description: reason of failure - - /balance/status: - get: - tags: - - CustomerService - - SystemService - summary: returns account balance status - operationId: getBalance - parameters: - - { name: id, in: query, required: true, schema: { type: string }, description: "id of account" } - responses: - "200": - description: OK - content: - application/json: - schema: - type: number - description: accounts balance - "400": - description: NOK - content: - application/json: - schema: - type: string - description: reason of failure - - /balance/transactions: - get: - tags: - - CustomerService - - SystemService - summary: returns transactions of specific account for specific time interval - operationId: getTransactions - parameters: - - { name: id, in: query, required: true, schema: { type: string }, description: "id of account" } - - { name: beginning, in: query, required: true, schema: { type: string, format: date }, description: "date from which onwards the transactions happened" } - - { name: end, in: query, required: true, schema: { type: string, format: date }, description: "date before which wanted transactions happened" } - - { name: minAmount, in: query, required: false, schema: { type: number }, description: "minimal amount of money included in transaction to be reported" } - - { name: maxAmount, in: query, required: false, schema: { type: number }, description: "maximal amount of money included in transaction to be reported" } - - { name: type, in: query, required: false, schema: { $ref: "#/components/schemas/TransactionType" }, description: "type of transactiops to be included in returned ones" } - responses: - "200": - description: OK - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/Transaction" - "400": - description: NOK - content: - application/json: - schema: - type: string - description: reason of failure - - /balance/alltransactions: - get: - tags: - - EmployeeService - summary: returns all transactions for specific time interval - operationId: getAllTransactions - parameters: - - { name: beginning, in: query, required: true, schema: { type: string, format: date }, description: "date from which onwards the transactions happened" } - - { name: end, in: query, required: true, schema: { type: string, format: date }, description: "date before which wanted transactions happened" } - - { name: minAmount, in: query, required: false, schema: { type: number }, description: "minimal amount of money included in transaction to be reported" } - - { name: maxAmount, in: query, required: false, schema: { type: number }, description: "maximal amount of money included in transaction to be reported" } - - { name: type, in: query, required: false, schema: { $ref: "#/components/schemas/TransactionType" }, description: "type of transactiops to be included in returned ones" } - responses: - "200": - description: OK - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/Transaction" - "400": - description: NOK - content: - application/json: - schema: - type: string - description: reason of failure - - /balance/account/report: - get: - tags: - - EmployeeService - summary: creates a report of spending statistics for one user - operationId: createReport - parameters: - - { name: id, in: query, required: true, schema: { type: string }, description: "id of account" } - - { name: beginning, in: query, required: true, schema: { type: string, format: date }, description: "date from which onwards the transactions wanted in report happened" } - - { name: end, in: query, required: true, schema: { type: string, format: date }, description: "date before which wanted transactions wanted in report happened" } - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/TransactionsReport' - "400": - description: NOK - content: - application/json: - schema: - type: string - description: reason of failure diff --git a/m2m-banking-api/transaction-api/target/classes/openapi.yaml b/m2m-banking-api/transaction-api/target/classes/openapi.yaml deleted file mode 100644 index f28a6e3fd226e1b5f1816b898d9eae49707dc6c4..0000000000000000000000000000000000000000 --- a/m2m-banking-api/transaction-api/target/classes/openapi.yaml +++ /dev/null @@ -1,159 +0,0 @@ -openapi: 3.0.1 -info: - title: Transaction Processor API - description: Public API of Online Banking System - Transaction Processor - version: 1.0.0 -servers: - - url: "localhost:8081" -tags: - - name: Transaction - description: API for transaction requests - - name: ProcessorApi - description: API for administration of transaction processes - -paths: - /transaction/v1/process: - put: - tags: - - Transaction - operationId: create-transaction-process - summary: Create a new request for a transaction to be processed - description: | - Method starts a new process for processing a transaction request defined by the input. - After a process is created successfully, it is being handled asynchronous. Method replies with a JSON object - containing a unique identifier of the created process, status and a message explaining the status. - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TransactionDto' - responses: - '201': - description: Process created, sent unique identifier assigned to new process. - content: - application/json: - schema: - $ref: '#/components/schemas/ProcessDto' - - /transaction/v1/status: - get: - tags: - - Transaction - operationId: status - summary: Get information about a existing transaction process - description: | - Method finds an existing process for a transaction request, returning all information about it's state - and further information regarding errors. - parameters: - - in: header - name: x-process-uuid - schema: - type: string - format: uuid - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ProcessDetailDto' - '404': - description: Resource or process by UUID not found - - /transaction/v1/revert: - post: - tags: - - Transaction - operationId: revert-transaction-process - summary: Revert a transaction - description: | - Method finds an existing process for a transaction request, which has been executed successfully, and reverts - the changes done - parameters: - - in: header - name: x-process-uuid - schema: - type: string - format: uuid - required: true - responses: - '200': - description: Process found and created new process reverting changes in accounts - content: - application/json: - schema: - $ref: '#/components/schemas/ProcessDto' - '400': - description: Process found by UUID but not in expected state (PROCESSED) - '404': - description: Resource or process by UUID not found - -components: - schemas: - TransactionTypeDto: - type: string - enum: - - WITHDRAW - - DEPOSIT - - CROSS_ACCOUNT - - SCHEDULED - description: Enumaration defining a type for a transaction. Each type may have different certain implementations and validations. - - AccountDto: - type: object - properties: - accountNumber: - type: string - description: Account number - - MoneyDto: - type: object - properties: - amount: - type: number - currency: - type: string - description: Currency code, short abbreviation of 3 characters such as 'EUR' or 'CZK'. - - TransactionDto: - type: object - properties: - source: - $ref: '#/components/schemas/AccountDto' - target: - $ref: '#/components/schemas/AccountDto' - type: - $ref: '#/components/schemas/TransactionTypeDto' - amount: - $ref: '#/components/schemas/MoneyDto' - detail: - type: string - description: Message or detail for transaction, holding user specified information - - StatusDto: - type: string - enum: - - CREATED - - PENDING - - PROCESSED - - FAILED - - ProcessDto: - type: object - properties: - identifier: - type: string - format: uuid - status: - $ref: '#/components/schemas/StatusDto' - info: - type: string - description: Message detail regarding process status, e.g. reason of failure or result of process. - - ProcessDetailDto: - allOf: - - $ref: '#/components/schemas/ProcessDto' - - $ref: '#/components/schemas/TransactionDto' - \ No newline at end of file