Skip to content

Commit

Permalink
Added LenderFilterNetwork and ServerWhitelisting GET by ID documentat…
Browse files Browse the repository at this point in the history
…ion (#35)

* Added LenderFilterNetwork and ServerWhitelisting GET by ID documentation

* Changes after review

* Changes after review

---------

Co-authored-by: dhruvthakker <dhruvthakker@gmail.com>
  • Loading branch information
DhruvThakker and dhruvthakker authored Mar 14, 2024
1 parent 3a0845b commit 228118f
Show file tree
Hide file tree
Showing 2 changed files with 341 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea/*
339 changes: 339 additions & 0 deletions apis/ocen-registry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,339 @@
{
"openapi": "3.0.2",
"info": {
"version": "1.0.0",
"title": "OCEN Registry API",
"contact": {
"email": "community@ispirt.in",
"url": "https://ispirt.in/"
}
},
"paths": {
"/service/products/{id}": {
"get": {
"operationId": "getProductByID",
"tags": [
"OCEN Registry API"
],
"summary": "Lookup a product by ID",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Product ID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Returns a product",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/CreditProduct"
}
}
}
}
}
},
"400": {
"description": "Invalid request"
},
"404": {
"description": "Not found"
}
}
}
},
"/service/lender-network-filters/{id}": {
"get": {
"tags": [
"OCEN Registry API"
],
"summary": "Lender Network Filter",
"description": "Lender NetworkFilter",
"operationId": "GetLenderNetworkFilterByID",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Lender Network Filter ID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Acknowledgement of Request Received",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LenderNetworkFilter"
}
}
}
},
"400": {
"description": "Invalid request"
},
"404": {
"description": "Not found"
}
}
}
},
"/service/server-whitelisting-items/{id}": {
"get": {
"tags": [
"OCEN Registry API"
],
"summary": "Server Whitelisting Item",
"description": "Server Whitelisting Item",
"operationId": "GetServerWhitelistingItemByID",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ServerWhitelistingItem ID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Found ServerWhitelistingItem for given ID",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServerWhitelistingItem"
}
}
}
},
"400": {
"description": "Invalid request"
},
"404": {
"description": "Not found"
}
}
}
}
},
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
},
"oAuth2Client": {
"type": "oauth2",
"flows": {
"clientCredentials": {
"tokenUrl": "https://ocen.com/auth/oauth2/token/",
"scopes": {}
}
}
}
},
"schemas": {
"ParticipantRole": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"participantRole": {
"type": "string",
"enum": [
"LENDER",
"LOAN_AGENT",
"DISBURSEMENT_PARTNER",
"COLLECTIONS_PARTNER",
"DERIVED_DATA_PARTNER",
"KYC_PARTNER",
"ADMIN",
"REGULATOR"
]
},
"approvedBy": {
"type": "string"
},
"isApproved": {
"type": "boolean"
},
"participantRoleStatus": {
"type": "string",
"enum": [
"APPLIED",
"UNDER_REVIEW",
"APPROVED",
"REJECTED"
]
},
"participatingOrganization": {
"type": "object",
"ref": null
}
}
},
"CreditProduct": {
"type": "object",
"required": [
"name",
"description"
],
"properties": {
"name": {
"type": "string",
"maxLength": 35,
"description": "Name of product"
},
"productName": {
"type": "string",
"maxLength": 35,
"description": "Name of product"
},
"productCreatedBy": {
"$ref": "#/components/schemas/ParticipantRole"
},
"productDescription": {
"type": "string",
"maxLength": 35,
"description": "Description of product."
},
"isPrivate": {
"type": "boolean"
},
"isEndUseControlled": {
"type": "boolean"
},
"isCollectionControlled": {
"type": "boolean"
},
"isAAFlowRequired": {
"type": "boolean"
},
"isMonitoringConsentRequired": {
"type": "boolean"
},
"isDerivedDataPartnerRequired": {
"type": "boolean"
},
"derivedDataDescription": {
"type": "string",
"maxLength": 1000,
"description": "Description of product."
}
}
},
"ProductNetwork": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"productNetworkName": {
"type": "string"
},
"productNetworkDescription": {
"type": "string"
},
"participantRoles": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ParticipantRole"
}
},
"creditProduct": {
"$ref": "#/components/schemas/CreditProduct"
},
"networkCreatedBy": {
"$ref": "#/components/schemas/ParticipantRole"
}
}
},
"LenderNetworkFilter": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"requirementName": {
"type": "string",
"enum": [
"BORROWER_TYPE",
"MINIMUM_TENURE",
"MAXIMUM_TENURE",
"MINIMUM_AMOUNT",
"MAXIMUM_AMOUNT",
"UNDERWRITING_PARAMETER",
"BUREAU_SCORE"
]
},
"operator": {
"type": "string",
"enum": [
"EQUALS,",
"GREATER_THAN",
"LESS_THAN",
"GREATER_THAN_OR_EQUAL_TO",
"LESS_THAN_OR_EQUAL_TO",
"NOT_EQUALS"
]
},
"value": {
"type": "string"
},
"productNetwork": {
"$ref": "#/components/schemas/ProductNetwork"
},
"participantId": {
"$ref": "#/components/schemas/ParticipantRole"
}
}
},
"ServerWhitelistingItem": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"ipAddress": {
"type": "string"
},
"portNumber": {
"type": "string"
},
"participantRole": {
"ref": "./ParticipantRole.yaml"
}
}
}
}
},
"security": [
{
"bearerAuth": []
},
{
"oAuth2Client": []
}
]
}

0 comments on commit 228118f

Please sign in to comment.