How to fix ErrorException: @OA\Items() is required when @OA\Property() has type "array"?
11,202
I've found the solution:
* @OA\Property(
* type="array",
* @OA\Items(
* type="array",
* @OA\Items()
* ),
* description="bla bla bla"
* )
The issue was @OA\Schema
Comments
-
Andrei Lupuleasa over 1 year
I've tried to add a nested array of arbitrary types. These are my annotations:
* @OA\Property( * @OA\Schema( * type="array", * @OA\Items( * type="array", * @OA\Items(type={}) * ) * ), * description="bla bla bla" * )
-
Henry almost 4 yearsThanks, this really helped!
-
ali Falahati over 2 yearshow we can set required for a field?
-
Andrei Lupuleasa over 2 years* @OA\Parameter( * name="", * in="path", * @OA\Schema(type="string"), * required=true, * description="" * ),