X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Focpp%2FOCPPResponseService.ts;h=a526c28c6812fea7b27108d1b46daa9c3fe731ec;hb=d61c71931ec8c16df695b1f2db2ae85540de0745;hp=45a3e1f2d5822f5236e0266492935effd38f165d;hpb=298be10c5c800e43b0b9dcd6c50f6d49e2cb786b;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/OCPPResponseService.ts b/src/charging-station/ocpp/OCPPResponseService.ts index 45a3e1f2..a526c28c 100644 --- a/src/charging-station/ocpp/OCPPResponseService.ts +++ b/src/charging-station/ocpp/OCPPResponseService.ts @@ -23,8 +23,8 @@ export abstract class OCPPResponseService { private readonly version: OCPPVersion protected readonly ajv: Ajv protected readonly ajvIncomingRequest: Ajv - protected abstract jsonSchemasValidateFunction: Map> - public abstract jsonSchemasIncomingRequestResponseValidateFunction: Map< + protected abstract payloadValidateFunctions: Map> + public abstract incomingRequestResponsePayloadValidateFunctions: Map< IncomingRequestCommand, ValidateFunction > @@ -60,7 +60,7 @@ export abstract class OCPPResponseService { if (chargingStation.stationInfo?.ocppStrictCompliance === false) { return true } - const validate = this.jsonSchemasValidateFunction.get(commandName) + const validate = this.payloadValidateFunctions.get(commandName) if (validate?.(payload) === true) { return true }