Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kdivya153 committed May 21, 2024
1 parent 2cfc4f2 commit 118ed5b
Show file tree
Hide file tree
Showing 7 changed files with 452 additions and 341 deletions.
11 changes: 0 additions & 11 deletions cli/examples/federatedData.json

This file was deleted.

29 changes: 0 additions & 29 deletions cli/examples/federatedData.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion server/src/.mf.config.SAMPLE.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"cliFlag": null,
"cliShortFlag": null,
"url_Note": "Can be changed to test different versions of the firebolt-open-rpc",
"url": "https://rdkcentral.github.io/firebolt/requirements/pr-feature-user-interest/specifications/firebolt-open-rpc.json",
"url": "https://rdkcentral.github.io/firebolt/requirements/latest/specifications/firebolt-open-rpc.json",
"enabled": true
},
{
Expand Down
5 changes: 0 additions & 5 deletions server/src/fireboltOpenRpc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -176,21 +176,16 @@ function validateMethodResult(val, methodName) {

try {
const oMethod = getMethod(methodName);
//console.log("MethodName",methodName)
console.log("******oMethod",JSON.stringify(oMethod))
const oResult = oMethod.result;
//console.log("*&&&&&&&oResult",JSON.stringify(oResult))
let oSchema = oResult.schema;
if ( '$ref' in oSchema ) {
const ref = oSchema['$ref'];
const schemaName = ref.substring(ref.lastIndexOf('/') + 1);
oSchema = getSchema(schemaName);
// console.log("0schemaName",JSON.stringify(oSchema))
}
//console.log("0schemaName outside",JSON.stringify(oSchema))
const validate = ajv.compile(oSchema);
const valid = validate(val);
console.log("valid ",JSON.stringify(valid))
if ( !valid ) {
errors = validate.errors;
}
Expand Down
1 change: 0 additions & 1 deletion server/src/messageHandler.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ async function handleMessage(message, userId, ws) {
// Handle Firebolt Method call using our in-memory mock values
logger.debug(`Retrieving override mock value for method ${oMsg.method}`);
response = await stateManagement.getMethodResponse(userId, oMsg.method, oMsg.params, ws); // Could be optimized cuz we know we want an override response
console.log('Response inside:::', response)
} else if (process.env.proxy) {
//bypass JSON-RPC calls and hit proxy server endpoint
//init websocket connection for proxy request to be sent and use receiver client to send events back to caller.
Expand Down
Loading

0 comments on commit 118ed5b

Please sign in to comment.