我想通过POST方法将数组发送到我的API。
这是我的代码:
/**
* @OA\Post(path="/test/bulk/{edition}/{company}", tags={"Test"}, summary="Test",
* @OA\Parameter(
* name="company", required=true, in="path", @OA\Schema(type="integer")
* ),
* @OA\Parameter(
* name="edition", required=true, in="path", @OA\Schema(type="integer")
* ),
* @OA\RequestBody(
* @OA\MediaType(mediaType="multipart/form-data",
* @OA\Schema(
* @OA\Property(property="key[]", type="array", collectionFormat="multi", @OA\Items(type="string")),
* @OA\Property(property="value[]", type="array", collectionFormat="multi", @OA\Items(type="string")),
* @OA\Property(property="file[]", type="array", collectionFormat="multi", @OA\Items(type="string", format="binary")),
* @OA\Property(property="confirmed[]", type="array", collectionFormat="multi", @OA\Items(type="integer")),
* required={"key", "confirmed"}
* )
* )
* ),
* @OA\Response(response=201, description="OK"),
* @OA\Response(response=400, description="Not Found or Validation Error"),
* )
*/
但是我不知道为什么招摇是这样发送的:
key[]: key1,key2,
value[]: value1,value2
file[]:
confirmed[]: 1,0
那么,我应该怎么形容呢?