如何修复 ErrorException:当 @OA\Property() 的类型为 "array" 时需要 @OA\Items()?
How to fix ErrorException: @OA\Items() is required when @OA\Property() has type "array"?
我尝试添加一个任意类型的嵌套数组。
这些是我的注释:
* @OA\Property(
* @OA\Schema(
* type="array",
* @OA\Items(
* type="array",
* @OA\Items(type={})
* )
* ),
* description="bla bla bla"
* )
我找到了解决方案:
* @OA\Property(
* type="array",
* @OA\Items(
* type="array",
* @OA\Items()
* ),
* description="bla bla bla"
* )
问题是@OA\Schema
我尝试添加一个任意类型的嵌套数组。 这些是我的注释:
* @OA\Property(
* @OA\Schema(
* type="array",
* @OA\Items(
* type="array",
* @OA\Items(type={})
* )
* ),
* description="bla bla bla"
* )
我找到了解决方案:
* @OA\Property(
* type="array",
* @OA\Items(
* type="array",
* @OA\Items()
* ),
* description="bla bla bla"
* )
问题是@OA\Schema