foreach ($payload[$field->
getPropertyName()] as $key =>
$entityPayload) { $payload[$field->
getPropertyName()][$key] =
$this->
convertPayload( $field instanceof ManyToManyAssociationField ?
$field->
getToManyReferenceDefinition() :
$field->
getReferenceDefinition(),
$entityPayload,
$conversionException,
$pointer . '/' .
$key . '/' .
$field->
getPropertyName() );
} } $payload =
$this->
validateFields($definition,
$payload);
return $payload;
} /**
* @param array<string, mixed> $payload
*
* @return array<string, mixed>
*/
private function validateFields(EntityDefinition
$definition, array
$payload): array
{