Open v-noskov opened 5 months ago
I tried to reproduce this bug using your description and the sample code you provided, but it worked as expected with both version 4.24.1
and the latest version 4.25.3
.
Could you provide more of your code or at best a minimal, self-contained and reproducible test case?
#[\OpenApi\Attributes\Property(type: 'string')]
and @OA\Property(type = "string")
from the User::location property, this property was included in 'required' array.It's just a demo. If this bug will be fixed, User::location must be in 'required' array even with OA\Property attribute/annotation.
Version
4.24.1
Description
Model properties without OA\Property annotation or attribute are included in the model's 'required' array if they aren't nullable and don't have a default value. For instance, model:
is described as:
But if you add OA\Property annotation or attribute:
the corresponding property won't be added to the 'required' array:
Additional context
No response