diff --git a/src/Core/Bridge/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaCollectionRestriction.php b/src/Core/Bridge/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaCollectionRestriction.php index 69b960c1359..8a4605ec33e 100644 --- a/src/Core/Bridge/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaCollectionRestriction.php +++ b/src/Core/Bridge/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaCollectionRestriction.php @@ -57,7 +57,7 @@ public function create(Constraint $constraint, ApiProperty $propertyMetadata): a $required[] = $field; } - $restriction['properties'][$field] = $this->mergeConstraintRestrictions($baseConstraint, $propertyMetadata); + $restriction['properties'][$field] = $this->mergeConstraintRestrictions($baseConstraint, new ApiProperty()); } if ($required) {