【发布时间】:2021-09-22 11:16:55
【问题描述】:
我正在尝试使用 swagger 发送一个数组。但是当我在检查模式下检查数组时,我注意到正在发送的数组只是一个字符串而不是数组
/**
* @OA\Post(
* path="/api/update-landing-page",
* summary="Update Landing Page",
* description="Update Landing Page",
* tags={"Landing Page Backend"},
* security={{"bearer": {} }},
* @OA\RequestBody(
* required=true,
* @OA\MediaType(
* mediaType="multipart/form-data",
* @OA\Schema(
* required={"businesses","image"},
* @OA\Property(
* property="businesses",
* description="Business ID",
* type="array",
* @OA\Items(type="string", format="id"),
* ),
* @OA\Property(property="image", type="string", format="binary")
* )
* )
* ),
* @OA\Response(
* response=200,
* description="",
* @OA\MediaType(
* mediaType="application/json",
* )
* )
* )
*/
我想要一组企业 ID。看起来像这样 企业:[1,2,3]。
如何让它变成一个数组?
感谢您抽出宝贵时间并感谢您。
【问题讨论】:
标签: swagger swagger-php