NelmioApiDocBundle icon indicating copy to clipboard operation
NelmioApiDocBundle copied to clipboard

[Bug]: Not nullable with default are required

Open alxvgt opened this issue 8 months ago • 1 comments

Version

4.27.0

Description

During our recent update from 4.26.2 to 4.27.0 some of our properties are now mark as required but i'm not sure if it should be the case.

Ex :

class Test
{
    /**
     * @OA\Property(type="array", @OA\Items(ref=@Model(type=Toto::class)))
     */
    protected array $options = [];

    protected ?string $callback = null;

In this case :

  • options is set as required
  • callback is set as not required

Both has default value that led to not require any value i guess ?

Additional context

No response

alxvgt avatar Jun 19 '24 14:06 alxvgt