From 74fdfd4c1f3b56d55e90b41cde3b9e5eb5fb971d Mon Sep 17 00:00:00 2001 From: GitHub Date: Wed, 3 May 2023 22:14:46 +0000 Subject: [PATCH] Handle Json validation errors (#110) --- src/API/LocalApi.php | 4 + src/API/OpenApi.php | 423 ++++++++++++++++++++++++++++++++++------- src/API/OpenPulsar.php | 3 + 3 files changed, 361 insertions(+), 69 deletions(-) diff --git a/src/API/LocalApi.php b/src/API/LocalApi.php index 784c0ff..89dbe68 100644 --- a/src/API/LocalApi.php +++ b/src/API/LocalApi.php @@ -1321,6 +1321,9 @@ private function decodePayload(string $data): Entities\API\DeviceRawMessage|null 'message' => [ 'command' => $command->getValue(), 'payload' => $payload, + 'schema' => $command->equalsValue( + Types\LocalDeviceCommand::CMD_STATUS, + ) ? self::WIFI_QUERY_MESSAGE_SCHEMA_FILENAME : self::DP_QUERY_MESSAGE_SCHEMA_FILENAME, ], ], ); @@ -1367,6 +1370,7 @@ private function decodePayload(string $data): Entities\API\DeviceRawMessage|null 'message' => [ 'command' => $command->getValue(), 'payload' => $payload, + 'schema' => self::WIFI_QUERY_MESSAGE_SCHEMA_FILENAME, ], ], ); diff --git a/src/API/OpenApi.php b/src/API/OpenApi.php index 95a496b..6496622 100644 --- a/src/API/OpenApi.php +++ b/src/API/OpenApi.php @@ -170,10 +170,27 @@ public function connect(): void throw new Exceptions\InvalidState('Calling get access token returned invalid response'); } - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::ACCESS_TOKEN_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::ACCESS_TOKEN_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received access token response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::ACCESS_TOKEN_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + throw new Exceptions\OpenApiCall('Could not decode received access token response payload'); + } $result = $parsedMessage->offsetGet('result'); @@ -248,15 +265,36 @@ public function getUserDevices( if ($result instanceof Promise\PromiseInterface) { $result ->then(function (Message\ResponseInterface $response) use ($promise): void { - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::USER_DEVICES_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::USER_DEVICES_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::USER_DEVICES_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + $promise->reject(new Exceptions\OpenApiCall('Could not decode received response payload')); + + return; + } $result = $parsedMessage->offsetGet('result'); if (!$result instanceof Utils\ArrayHash) { - throw new Exceptions\OpenApiCall('Received response is not valid'); + $promise->reject(new Exceptions\OpenApiCall('Received response is not valid')); + + return; } $devices = []; @@ -312,15 +350,36 @@ public function getUserDevicesFactoryInfos( if ($result instanceof Promise\PromiseInterface) { $result ->then(function (Message\ResponseInterface $response) use ($promise): void { - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::USER_DEVICES_FACTORY_INFOS_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::USER_DEVICES_FACTORY_INFOS_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::USER_DEVICES_FACTORY_INFOS_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + $promise->reject(new Exceptions\OpenApiCall('Could not decode received response payload')); + + return; + } $result = $parsedMessage->offsetGet('result'); if (!$result instanceof Utils\ArrayHash) { - throw new Exceptions\OpenApiCall('Received response is not valid'); + $promise->reject(new Exceptions\OpenApiCall('Received response is not valid')); + + return; } $factoryInfos = []; @@ -371,15 +430,36 @@ public function getUserDeviceDetail( if ($result instanceof Promise\PromiseInterface) { $result ->then(function (Message\ResponseInterface $response) use ($promise): void { - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::USER_DEVICE_DETAIL_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::USER_DEVICE_DETAIL_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::USER_DEVICE_DETAIL_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + $promise->reject(new Exceptions\OpenApiCall('Could not decode received response payload')); + + return; + } $result = $parsedMessage->offsetGet('result'); if (!$result instanceof Utils\ArrayHash) { - throw new Exceptions\OpenApiCall('Received response is not valid'); + $promise->reject(new Exceptions\OpenApiCall('Received response is not valid')); + + return; } $deviceStatus = []; @@ -441,15 +521,36 @@ public function getUserDeviceSpecifications( if ($result instanceof Promise\PromiseInterface) { $result ->then(function (Message\ResponseInterface $response) use ($promise): void { - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::USER_DEVICE_SPECIFICATIONS_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::USER_DEVICE_SPECIFICATIONS_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::USER_DEVICE_SPECIFICATIONS_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + $promise->reject(new Exceptions\OpenApiCall('Could not decode received response payload')); + + return; + } $result = $parsedMessage->offsetGet('result'); if (!$result instanceof Utils\ArrayHash) { - throw new Exceptions\OpenApiCall('Received response is not valid'); + $promise->reject(new Exceptions\OpenApiCall('Received response is not valid')); + + return; } $deviceFunctions = []; @@ -532,15 +633,36 @@ public function getUserDeviceStatus( if ($result instanceof Promise\PromiseInterface) { $result ->then(function (Message\ResponseInterface $response) use ($promise): void { - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::USER_DEVICE_STATUS_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::USER_DEVICE_STATUS_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::USER_DEVICE_STATUS_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + $promise->reject(new Exceptions\OpenApiCall('Could not decode received response payload')); + + return; + } $result = $parsedMessage->offsetGet('result'); if (!$result instanceof Utils\ArrayHash) { - throw new Exceptions\OpenApiCall('Received response is not valid'); + $promise->reject(new Exceptions\OpenApiCall('Received response is not valid')); + + return; } $statuses = []; @@ -591,15 +713,36 @@ public function getUserDeviceChildren( if ($result instanceof Promise\PromiseInterface) { $result ->then(function (Message\ResponseInterface $response) use ($promise): void { - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::USER_DEVICE_CHILDREN_DEVICES_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::USER_DEVICE_CHILDREN_DEVICES_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::USER_DEVICE_CHILDREN_DEVICES_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + $promise->reject(new Exceptions\OpenApiCall('Could not decode received response payload')); + + return; + } $result = $parsedMessage->offsetGet('result'); if (!$result instanceof Utils\ArrayHash) { - throw new Exceptions\OpenApiCall('Received response is not valid'); + $promise->reject(new Exceptions\OpenApiCall('Received response is not valid')); + + return; } $children = []; @@ -653,21 +796,44 @@ public function getDevices( if ($result instanceof Promise\PromiseInterface) { $result ->then(function (Message\ResponseInterface $response) use ($promise): void { - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::DEVICES_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::DEVICES_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::DEVICES_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + $promise->reject(new Exceptions\OpenApiCall('Could not decode received response payload')); + + return; + } $result = $parsedMessage->offsetGet('result'); if (!$result instanceof Utils\ArrayHash) { - throw new Exceptions\OpenApiCall('Received response is not valid'); + $promise->reject(new Exceptions\OpenApiCall('Received response is not valid')); + + return; } $list = $result->offsetGet('list'); if (!$list instanceof Utils\ArrayHash) { - throw new Exceptions\OpenApiCall('Received response is not valid'); + $promise->reject(new Exceptions\OpenApiCall('Received response is not valid')); + + return; } $devices = []; @@ -723,15 +889,36 @@ public function getDevicesFactoryInfos( if ($result instanceof Promise\PromiseInterface) { $result ->then(function (Message\ResponseInterface $response) use ($promise): void { - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::DEVICES_FACTORY_INFOS_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::DEVICES_FACTORY_INFOS_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::DEVICES_FACTORY_INFOS_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + $promise->reject(new Exceptions\OpenApiCall('Could not decode received response payload')); + + return; + } $result = $parsedMessage->offsetGet('result'); if (!$result instanceof Utils\ArrayHash) { - throw new Exceptions\OpenApiCall('Received response is not valid'); + $promise->reject(new Exceptions\OpenApiCall('Received response is not valid')); + + return; } $factoryInfos = []; @@ -782,15 +969,36 @@ public function getDeviceInformation( if ($result instanceof Promise\PromiseInterface) { $result ->then(function (Message\ResponseInterface $response) use ($promise): void { - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::DEVICE_INFORMATION_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::DEVICE_INFORMATION_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::DEVICE_INFORMATION_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + $promise->reject(new Exceptions\OpenApiCall('Could not decode received response payload')); + + return; + } $result = $parsedMessage->offsetGet('result'); if (!$result instanceof Utils\ArrayHash) { - throw new Exceptions\OpenApiCall('Received response is not valid'); + $promise->reject(new Exceptions\OpenApiCall('Received response is not valid')); + + return; } $promise->resolve(EntityFactory::build( @@ -831,15 +1039,36 @@ public function getDeviceSpecification( if ($result instanceof Promise\PromiseInterface) { $result ->then(function (Message\ResponseInterface $response) use ($promise): void { - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::DEVICE_SPECIFICATION_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::DEVICE_SPECIFICATION_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::DEVICE_SPECIFICATION_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + $promise->reject(new Exceptions\OpenApiCall('Could not decode received response payload')); + + return; + } $result = $parsedMessage->offsetGet('result'); if (!$result instanceof Utils\ArrayHash) { - throw new Exceptions\OpenApiCall('Received response is not valid'); + $promise->reject(new Exceptions\OpenApiCall('Received response is not valid')); + + return; } $deviceFunctions = []; @@ -922,15 +1151,36 @@ public function getDeviceStatus( if ($result instanceof Promise\PromiseInterface) { $result ->then(function (Message\ResponseInterface $response) use ($promise): void { - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::DEVICE_STATUS_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::DEVICE_STATUS_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::DEVICE_STATUS_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + $promise->reject(new Exceptions\OpenApiCall('Could not decode received response payload')); + + return; + } $result = $parsedMessage->offsetGet('result'); if (!$result instanceof Utils\ArrayHash) { - throw new Exceptions\OpenApiCall('Received response is not valid'); + $promise->reject(new Exceptions\OpenApiCall('Received response is not valid')); + + return; } $statuses = []; @@ -1002,10 +1252,29 @@ public function setDeviceStatus( if ($result instanceof Promise\PromiseInterface) { $result ->then(function (Message\ResponseInterface $response) use ($promise): void { - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::DEVICE_SEND_COMMAND_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::DEVICE_SEND_COMMAND_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::DEVICE_SEND_COMMAND_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + $promise->reject(new Exceptions\OpenApiCall('Could not decode received response payload')); + + return; + } $promise->resolve(boolval($parsedMessage->offsetGet('result'))); }) @@ -1221,7 +1490,6 @@ private function checkResponse(string $path, Message\ResponseInterface $response /** * @throws Exceptions\OpenApiCall * @throws RuntimeException - * @throws MetadataExceptions\Logic */ private function refreshAccessToken(string $path): void { @@ -1250,10 +1518,27 @@ private function refreshAccessToken(string $path): void assert($response instanceof Message\ResponseInterface); - $parsedMessage = $this->schemaValidator->validate( - $response->getBody()->getContents(), - $this->getSchemaFilePath(self::REFRESH_TOKEN_MESSAGE_SCHEMA_FILENAME), - ); + try { + $parsedMessage = $this->schemaValidator->validate( + $response->getBody()->getContents(), + $this->getSchemaFilePath(self::REFRESH_TOKEN_MESSAGE_SCHEMA_FILENAME), + ); + } catch (MetadataExceptions\Logic | MetadataExceptions\MalformedInput | MetadataExceptions\InvalidData $ex) { + $this->logger->error( + 'Could not decode received refresh token response payload', + [ + 'source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_TUYA, + 'type' => 'openapi-api', + 'exception' => BootstrapHelpers\Logger::buildException($ex), + 'response' => [ + 'body' => $response->getBody()->rewind()->getContents(), + 'schema' => self::REFRESH_TOKEN_MESSAGE_SCHEMA_FILENAME, + ], + ], + ); + + throw new Exceptions\OpenApiCall('Could not decode received refresh token response payload'); + } $result = $parsedMessage->offsetGet('result'); diff --git a/src/API/OpenPulsar.php b/src/API/OpenPulsar.php index 7abe296..f5c9505 100644 --- a/src/API/OpenPulsar.php +++ b/src/API/OpenPulsar.php @@ -337,6 +337,7 @@ private function handleWsMessage(string $message): void 'exception' => BootstrapHelpers\Logger::buildException($ex), 'data' => [ 'message' => $message, + 'schema' => self::WS_MESSAGE_SCHEMA_FILENAME, ], 'connector' => [ 'identifier' => $this->identifier, @@ -434,6 +435,7 @@ private function handleWsMessage(string $message): void 'exception' => BootstrapHelpers\Logger::buildException($ex), 'data' => [ 'payload' => $payload, + 'schema' => self::WS_MESSAGE_PAYLOAD_SCHEMA_FILENAME, ], 'connector' => [ 'identifier' => $this->identifier, @@ -527,6 +529,7 @@ private function handleWsMessage(string $message): void 'exception' => BootstrapHelpers\Logger::buildException($ex), 'data' => [ 'data' => $decryptedData, + 'schema' => self::WS_MESSAGE_PAYLOAD_DATA_SCHEMA_FILENAME, ], 'connector' => [ 'identifier' => $this->identifier,