Skip to content

Commit

Permalink
fix(SymfonyConstraintAnnotationReader): disallow null if NotNull attr…
Browse files Browse the repository at this point in the history
…ibute is present

Fixes #2309
  • Loading branch information
jeremyVignelles committed Aug 2, 2024
1 parent 12a0ff1 commit b5b8149
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b5b8149

Please sign in to comment.