Skip to content

Commit 228118f

Browse files
DhruvThakkerdhruvthakker
and
dhruvthakker
authored
Added LenderFilterNetwork and ServerWhitelisting GET by ID documentation (#35)
* Added LenderFilterNetwork and ServerWhitelisting GET by ID documentation * Changes after review * Changes after review --------- Co-authored-by: dhruvthakker <[email protected]>
1 parent 3a0845b commit 228118f

File tree

2 files changed

+341
-0
lines changed

2 files changed

+341
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@
1818
npm-debug.log*
1919
yarn-debug.log*
2020
yarn-error.log*
21+
22+
.idea/*

apis/ocen-registry.json

+339
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,339 @@
1+
{
2+
"openapi": "3.0.2",
3+
"info": {
4+
"version": "1.0.0",
5+
"title": "OCEN Registry API",
6+
"contact": {
7+
"email": "[email protected]",
8+
"url": "https://ispirt.in/"
9+
}
10+
},
11+
"paths": {
12+
"/service/products/{id}": {
13+
"get": {
14+
"operationId": "getProductByID",
15+
"tags": [
16+
"OCEN Registry API"
17+
],
18+
"summary": "Lookup a product by ID",
19+
"parameters": [
20+
{
21+
"name": "id",
22+
"in": "path",
23+
"description": "Product ID",
24+
"required": true,
25+
"schema": {
26+
"type": "string"
27+
}
28+
}
29+
],
30+
"responses": {
31+
"200": {
32+
"description": "Returns a product",
33+
"content": {
34+
"application/json": {
35+
"schema": {
36+
"type": "object",
37+
"properties": {
38+
"data": {
39+
"$ref": "#/components/schemas/CreditProduct"
40+
}
41+
}
42+
}
43+
}
44+
}
45+
},
46+
"400": {
47+
"description": "Invalid request"
48+
},
49+
"404": {
50+
"description": "Not found"
51+
}
52+
}
53+
}
54+
},
55+
"/service/lender-network-filters/{id}": {
56+
"get": {
57+
"tags": [
58+
"OCEN Registry API"
59+
],
60+
"summary": "Lender Network Filter",
61+
"description": "Lender NetworkFilter",
62+
"operationId": "GetLenderNetworkFilterByID",
63+
"parameters": [
64+
{
65+
"name": "id",
66+
"in": "path",
67+
"description": "Lender Network Filter ID",
68+
"required": true,
69+
"schema": {
70+
"type": "string"
71+
}
72+
}
73+
],
74+
"responses": {
75+
"200": {
76+
"description": "Acknowledgement of Request Received",
77+
"content": {
78+
"application/json": {
79+
"schema": {
80+
"$ref": "#/components/schemas/LenderNetworkFilter"
81+
}
82+
}
83+
}
84+
},
85+
"400": {
86+
"description": "Invalid request"
87+
},
88+
"404": {
89+
"description": "Not found"
90+
}
91+
}
92+
}
93+
},
94+
"/service/server-whitelisting-items/{id}": {
95+
"get": {
96+
"tags": [
97+
"OCEN Registry API"
98+
],
99+
"summary": "Server Whitelisting Item",
100+
"description": "Server Whitelisting Item",
101+
"operationId": "GetServerWhitelistingItemByID",
102+
"parameters": [
103+
{
104+
"name": "id",
105+
"in": "path",
106+
"description": "ServerWhitelistingItem ID",
107+
"required": true,
108+
"schema": {
109+
"type": "string"
110+
}
111+
}
112+
],
113+
"responses": {
114+
"200": {
115+
"description": "Found ServerWhitelistingItem for given ID",
116+
"content": {
117+
"application/json": {
118+
"schema": {
119+
"$ref": "#/components/schemas/ServerWhitelistingItem"
120+
}
121+
}
122+
}
123+
},
124+
"400": {
125+
"description": "Invalid request"
126+
},
127+
"404": {
128+
"description": "Not found"
129+
}
130+
}
131+
}
132+
}
133+
},
134+
"components": {
135+
"securitySchemes": {
136+
"bearerAuth": {
137+
"type": "http",
138+
"scheme": "bearer",
139+
"bearerFormat": "JWT"
140+
},
141+
"oAuth2Client": {
142+
"type": "oauth2",
143+
"flows": {
144+
"clientCredentials": {
145+
"tokenUrl": "https://ocen.com/auth/oauth2/token/",
146+
"scopes": {}
147+
}
148+
}
149+
}
150+
},
151+
"schemas": {
152+
"ParticipantRole": {
153+
"type": "object",
154+
"properties": {
155+
"id": {
156+
"type": "integer",
157+
"format": "int64"
158+
},
159+
"participantRole": {
160+
"type": "string",
161+
"enum": [
162+
"LENDER",
163+
"LOAN_AGENT",
164+
"DISBURSEMENT_PARTNER",
165+
"COLLECTIONS_PARTNER",
166+
"DERIVED_DATA_PARTNER",
167+
"KYC_PARTNER",
168+
"ADMIN",
169+
"REGULATOR"
170+
]
171+
},
172+
"approvedBy": {
173+
"type": "string"
174+
},
175+
"isApproved": {
176+
"type": "boolean"
177+
},
178+
"participantRoleStatus": {
179+
"type": "string",
180+
"enum": [
181+
"APPLIED",
182+
"UNDER_REVIEW",
183+
"APPROVED",
184+
"REJECTED"
185+
]
186+
},
187+
"participatingOrganization": {
188+
"type": "object",
189+
"ref": null
190+
}
191+
}
192+
},
193+
"CreditProduct": {
194+
"type": "object",
195+
"required": [
196+
"name",
197+
"description"
198+
],
199+
"properties": {
200+
"name": {
201+
"type": "string",
202+
"maxLength": 35,
203+
"description": "Name of product"
204+
},
205+
"productName": {
206+
"type": "string",
207+
"maxLength": 35,
208+
"description": "Name of product"
209+
},
210+
"productCreatedBy": {
211+
"$ref": "#/components/schemas/ParticipantRole"
212+
},
213+
"productDescription": {
214+
"type": "string",
215+
"maxLength": 35,
216+
"description": "Description of product."
217+
},
218+
"isPrivate": {
219+
"type": "boolean"
220+
},
221+
"isEndUseControlled": {
222+
"type": "boolean"
223+
},
224+
"isCollectionControlled": {
225+
"type": "boolean"
226+
},
227+
"isAAFlowRequired": {
228+
"type": "boolean"
229+
},
230+
"isMonitoringConsentRequired": {
231+
"type": "boolean"
232+
},
233+
"isDerivedDataPartnerRequired": {
234+
"type": "boolean"
235+
},
236+
"derivedDataDescription": {
237+
"type": "string",
238+
"maxLength": 1000,
239+
"description": "Description of product."
240+
}
241+
}
242+
},
243+
"ProductNetwork": {
244+
"type": "object",
245+
"properties": {
246+
"id": {
247+
"type": "integer",
248+
"format": "int64"
249+
},
250+
"productNetworkName": {
251+
"type": "string"
252+
},
253+
"productNetworkDescription": {
254+
"type": "string"
255+
},
256+
"participantRoles": {
257+
"type": "array",
258+
"items": {
259+
"$ref": "#/components/schemas/ParticipantRole"
260+
}
261+
},
262+
"creditProduct": {
263+
"$ref": "#/components/schemas/CreditProduct"
264+
},
265+
"networkCreatedBy": {
266+
"$ref": "#/components/schemas/ParticipantRole"
267+
}
268+
}
269+
},
270+
"LenderNetworkFilter": {
271+
"type": "object",
272+
"properties": {
273+
"id": {
274+
"type": "integer",
275+
"format": "int64"
276+
},
277+
"requirementName": {
278+
"type": "string",
279+
"enum": [
280+
"BORROWER_TYPE",
281+
"MINIMUM_TENURE",
282+
"MAXIMUM_TENURE",
283+
"MINIMUM_AMOUNT",
284+
"MAXIMUM_AMOUNT",
285+
"UNDERWRITING_PARAMETER",
286+
"BUREAU_SCORE"
287+
]
288+
},
289+
"operator": {
290+
"type": "string",
291+
"enum": [
292+
"EQUALS,",
293+
"GREATER_THAN",
294+
"LESS_THAN",
295+
"GREATER_THAN_OR_EQUAL_TO",
296+
"LESS_THAN_OR_EQUAL_TO",
297+
"NOT_EQUALS"
298+
]
299+
},
300+
"value": {
301+
"type": "string"
302+
},
303+
"productNetwork": {
304+
"$ref": "#/components/schemas/ProductNetwork"
305+
},
306+
"participantId": {
307+
"$ref": "#/components/schemas/ParticipantRole"
308+
}
309+
}
310+
},
311+
"ServerWhitelistingItem": {
312+
"type": "object",
313+
"properties": {
314+
"id": {
315+
"type": "integer",
316+
"format": "int64"
317+
},
318+
"ipAddress": {
319+
"type": "string"
320+
},
321+
"portNumber": {
322+
"type": "string"
323+
},
324+
"participantRole": {
325+
"ref": "./ParticipantRole.yaml"
326+
}
327+
}
328+
}
329+
}
330+
},
331+
"security": [
332+
{
333+
"bearerAuth": []
334+
},
335+
{
336+
"oAuth2Client": []
337+
}
338+
]
339+
}

0 commit comments

Comments
 (0)