Skip to content

Commit

Permalink
ignore traverse process for passthru record
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Aug 28, 2023
1 parent 6924b7a commit e56fb85
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

namespace PSX\Data;

use PSX\Api\Model\Passthru;
use PSX\Data\Exception\InvalidDataException;
use PSX\Http\Exception as StatusCode;
use PSX\Http\MediaType;
Expand Down Expand Up @@ -84,7 +85,12 @@ public function getConfiguration(): Configuration
*/
public function read(mixed $schema, Payload $payload, ?SchemaVisitorInterface $visitor = null): mixed
{
$data = $this->parse($payload);
$data = $this->parse($payload);

if ($schema === Passthru::class) {
return Passthru::fromPayload($data);
}

$schema = $this->getSchema($schema);

if ($visitor === null) {
Expand Down

0 comments on commit e56fb85

Please sign in to comment.