Skip to content

Commit

Permalink
Implemented logic to load OpenAPI validator spec at app load
Browse files Browse the repository at this point in the history
Implemented logic to load OpenAPI validator spec at app load to improve latency issue
Removed unused import from some files
Added /status routs to debug version of app deployed
Added log for OpenAPI validator failure
Added log for layer2 config message
Added action in latency logs
  • Loading branch information
Abhishek Y committed Jun 29, 2024
1 parent 223afb6 commit 8248533
Show file tree
Hide file tree
Showing 25 changed files with 4,673 additions and 127 deletions.
7 changes: 7 additions & 0 deletions config/config-sample-client-localhost.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,10 @@ app:

useHMACForWebhook: false
sharedKeyForWebhookHMAC: ""

useLayer2Config: false
mandateLayer2Config: false

openAPIValidator:
cachedFileLimit: 5
initialFilesToCache: ""
7 changes: 7 additions & 0 deletions config/config-sample-network-localhost.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,10 @@ app:

useHMACForWebhook: false
sharedKeyForWebhookHMAC: ""

useLayer2Config: false
mandateLayer2Config: false

openAPIValidator:
cachedFileLimit: 5
initialFilesToCache: ""
7 changes: 7 additions & 0 deletions config/config-sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,10 @@ app:

useHMACForWebhook: false
sharedKeyForWebhookHMAC: ""

useLayer2Config: false
mandateLayer2Config: false

openAPIValidator:
cachedFileLimit: 5
initialFilesToCache: ""
7 changes: 7 additions & 0 deletions config/new-config-sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,10 @@ app:

useHMACForWebhook: false
sharedKeyForWebhookHMAC: ""

useLayer2Config: false
mandateLayer2Config: false

openAPIValidator:
cachedFileLimit: 5
initialFilesToCache: ""
7 changes: 7 additions & 0 deletions config/samples/bap-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,10 @@ app:

useHMACForWebhook: false
sharedKeyForWebhookHMAC: ""

useLayer2Config: false
mandateLayer2Config: false

openAPIValidator:
cachedFileLimit: 5
initialFilesToCache: ""
7 changes: 7 additions & 0 deletions config/samples/bap-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,10 @@ app:

useHMACForWebhook: false
sharedKeyForWebhookHMAC: ""

useLayer2Config: false
mandateLayer2Config: false

openAPIValidator:
cachedFileLimit: 5
initialFilesToCache: ""
7 changes: 7 additions & 0 deletions config/samples/bpp-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,10 @@ app:

useHMACForWebhook: false
sharedKeyForWebhookHMAC: ""

useLayer2Config: false
mandateLayer2Config: false

openAPIValidator:
cachedFileLimit: 5
initialFilesToCache: ""
7 changes: 7 additions & 0 deletions config/samples/bpp-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,10 @@ app:

useHMACForWebhook: false
sharedKeyForWebhookHMAC: ""

useLayer2Config: false
mandateLayer2Config: false

openAPIValidator:
cachedFileLimit: 5
initialFilesToCache: ""
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@
"dotenv": "^16.4.1",
"express": "^4.18.1",
"express-openapi-validator": "^5.1.6",
"yaml": "^2.4.2",
"express-status-monitor": "^1.3.4",
"ioredis": "^5.0.6",
"libsodium-wrappers": "^0.7.9",
"mongodb": "^4.7.0",
"node-mocks-http": "^1.15.0",
"request-ip": "^3.3.0",
"uuid": "^8.3.2",
"winston": "^3.7.2",
"winston-daily-rotate-file": "^4.7.1",
"yaml": "^2.4.2",
"zod": "^3.14.2"
}
}
9 changes: 9 additions & 0 deletions schemas/context_1.1.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"domain": "context.domain",
"version": "context.version",
"bap_id": "context.bap_id ? context.bap_id : getConfig().app.subscriberId",
"bap_uri": "context.bap_uri ? context.bap_uri : getConfig().app.subscriberUri",
"location": "context.location",
"bpp_id": "context.bpp_id",
"bpp_uri": "context.bpp_uri"
}
9 changes: 9 additions & 0 deletions schemas/context_1.1.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"domain": "context.domain",
"version": "context.version",
"bap_id": "context.bap_id ? context.bap_id : getConfig().app.subscriberId",
"bap_uri": "context.bap_uri ? context.bap_uri : getConfig().app.subscriberUri",
"location": "context.location",
"bpp_id": "context.bpp_id",
"bpp_uri": "context.bpp_uri"
}
Loading

0 comments on commit 8248533

Please sign in to comment.