-
Notifications
You must be signed in to change notification settings - Fork 0
/
money-transfer-1.0.yml
105 lines (105 loc) · 2.53 KB
/
money-transfer-1.0.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
openapi: 3.0.1
info:
title: Money Transfer
description: Revolut Challenge API
contact:
name: Hussein Monzer
email: [email protected]
version: "1.0"
paths:
/accounts/{accountId}:
get:
operationId: findAccountById
parameters:
- name: accountId
in: path
required: true
schema:
type: string
format: uuid
responses:
default:
description: findAccountById default response
content:
application/json:
schema:
$ref: '#/components/schemas/Object'
/accounts:
post:
operationId: createAccount
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountCreationApiRequest'
required: true
responses:
default:
description: createAccount default response
content:
application/json:
schema:
$ref: '#/components/schemas/Object'
/transfers/{transferId}:
get:
operationId: getMoneyTransferById
parameters:
- name: transferId
in: path
required: true
schema:
type: string
format: uuid
responses:
default:
description: getMoneyTransferById default response
content:
application/json:
schema:
$ref: '#/components/schemas/Object'
/transfers:
post:
operationId: createMoneyTransfer
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MoneyTransferApiRequest'
required: true
responses:
default:
description: createMoneyTransfer default response
content:
application/json:
schema:
$ref: '#/components/schemas/Object'
components:
schemas:
Object:
type: object
AccountCreationApiRequest:
required:
- initialAmount
type: object
properties:
initialAmount:
type: number
format: double
MoneyTransferApiRequest:
required:
- beneficiaryAccountId
- sourceAccountId
- transferAmount
type: object
properties:
sourceAccountId:
type: string
format: uuid
beneficiaryAccountId:
type: string
format: uuid
transferAmount:
type: number
format: double