diff --git a/src/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php b/src/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php index 39db78e5e..116958d07 100644 --- a/src/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php +++ b/src/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php @@ -90,6 +90,7 @@ private function processPropertyAnnotations($reflection, OA\Property $property, $existingRequiredFields[] = $propertyName; $this->schema->required = array_values(array_unique($existingRequiredFields)); + $property->nullable = false; } elseif ($annotation instanceof Assert\Length) { if (isset($annotation->min)) { $property->minLength = $annotation->min;