-
Notifications
You must be signed in to change notification settings - Fork 0
/
emicalculator.yml
262 lines (247 loc) · 7.64 KB
/
emicalculator.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
openapi: "3.0.0"
info:
title: EMI Calculator
description: API to manage the EMI Calculation process
version: 1.0.0
tags:
- name: EMIcalculator
description: A collection of EMI calculator api endpoints
servers:
- url: http://localhost:8091/ms-emicalculator-api/api/v1.0.0
paths:
/reference/calculator/settings:
post:
summary: Create the record in Loan CalculatorDetail with the basic details such as minimum principle amount, Interest rate and Terms in month, maximum principle amount, Interest rate and Terms in month to Calculate the Loan amount by selecting the values between the range.
operationId: createCalculatorBoundary
tags:
- reference
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateCalculatorBoundaryBody"
responses:
'200':
description: The response from the system
content:
application/json:
schema:
$ref: "#/components/schemas/EMICalculatorResponse"
/reference/calculator/settings/{loanType}:
put:
summary: Update the record in Loan CalculatorDetail with the basic details such as minimum principle amount, Interest rate and Terms in month, maximum principle amount, Interest rate and Terms in month to Calculate the Loan amount by selecting the values between the range.
operationId: updateCalculatorBoundary
tags:
- reference
parameters:
- name: loanType
in: path
description: Id of Loan CalculatorDetail table
required: true
example: HOME
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CalculatorBoundaryBody"
responses:
'200':
description: The response from the system
content:
application/json:
schema:
$ref: "#/components/schemas/EMICalculatorResponse"
get:
summary: Get details such as minimum principle amount, Interest rate and Terms in month, maximum principle amount, Interest rate and Terms in month to Calculate the Loan amount.
operationId: getCalculatorBoundary
tags:
- reference
parameters:
- name: loanType
in: path
description: Id of Loan CalculatorDetail table
required: true
example: HOME
schema:
type: string
responses:
'200':
description: The response from the system
content:
application/json:
schema:
$ref: "#/components/schemas/GetCalculatorBoundaryBody"
/system/loan:
post:
summary: API to create a loan Type in system level
operationId: createLoanType
tags:
- system
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateLoanTypeBody"
responses:
'200':
description: The response from the system
content:
application/json:
schema:
$ref: "#/components/schemas/EMICalculatorResponse"
/system/loan/{loanType}:
put:
summary: API to create a loan Type in system level
operationId: updateLoanType
tags:
- system
parameters:
- name: loanType
in: path
description: Id of Loan table
required: true
example: HOME
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/LoanTypeBody"
responses:
'200':
description: The response from the system
content:
application/json:
schema:
$ref: "#/components/schemas/EMICalculatorResponse"
delete:
summary: API to delete a loan Type in system level & also delete corresponding entry in calculator details table
operationId: deleteLoanType
tags:
- system
parameters:
- name: loanType
in: path
description: Id of Loan table
required: true
example: HOME
schema:
type: string
responses:
'200':
description: The response from the system
content:
application/json:
schema:
$ref: "#/components/schemas/EMICalculatorResponse"
get:
summary: Get List of loan created in system
operationId: getLoanType
tags:
- system
parameters:
- name: loanType
in: path
description: Id of Loan table
required: true
example: ALL
schema:
type: string
responses:
'200':
description: The response from the system
content:
application/json:
schema:
$ref: "#/components/schemas/GetLoanTypeBody"
components:
schemas:
LoanTypeBody:
properties:
currency:
type: string
enum: [USD, INR, EUR, SGD, GBP, CHY]
description: Base currency using in the bank
description:
type: string
description: Description for the Loan type and the payment mode
example: Home loan
required: [currency,description]
CalculatorBoundaryBody:
properties:
minAmount:
type: number
description: Minimum amount in selection range
example: 1000
maxAmount:
type: number
description: Maximum amount in selection range
example: 99999999
minInterestRate:
type: number
description: Minimum interest rate in selection range
example: 0
maxInterestRate:
type: number
description: Maximum interest rate in selection range
example: 15
minTermsInMonth:
type: number
description: Minimum terms in month in selection range
example: 1
maxTermsInMonth:
type: number
description: Maximum terms in month in selection range
example: 480
required: [
paymentType,
minAmount,
maxAmount,
minInterestRate,
maxInterestRate,
minTermsInMonth,
maxTermsInMonth]
EMICalculatorResponse:
properties:
returnCode:
type: string
description: The error code if there is a failure
additionalInfo:
type: string
description: The return response message or error message
GetCalculatorBoundaryBody:
allOf: [
$ref: "#/components/schemas/CalculatorBoundaryBody",
$ref: "#/components/schemas/EMICalculatorResponse"]
properties:
currencySymbol:
type: string
description: Symbol of the base currecny
example: "$"
CreateLoanTypeBody:
allOf: [
$ref: "#/components/schemas/LoanTypeBody"]
properties:
loanType:
type: string
description: primary key - Loan type
example: "HOME"
GetLoanTypeBody:
allOf: [
$ref: "#/components/schemas/EMICalculatorResponse"]
properties:
loanDetails:
type: array
items:
$ref: "#/components/schemas/CreateLoanTypeBody"
CreateCalculatorBoundaryBody:
allOf: [
$ref: "#/components/schemas/CalculatorBoundaryBody"]
properties:
loanType:
type: string
description: primary key - Loan type
example: "HOME"