swagger-php我集成到thinkphp中,但是post提交接收不到值

关于文档注释post提交怎么写?看了注释,还是不行??

/**
     * @SWG\Post(
     *     path="/addPets",
     *     tags={"Test"},
     *     operationId="addPets",
     *     summary="Add a new pet to the store",
     *     description="",
     *     consumes={"multipart/form-data"},
     *     produces={"multipart/form-data"},
     *     @SWG\Parameter(
     *         name="name",
     *         in="query",
     *         description="Pet object that needs to be added to the store",
     *         required=false,
     *          paramType="form",
     *         @SWG\Schema(ref="#/definitions/Pet"),
     *     ),
     *     @SWG\Response(
     *         response=405,
     *         description="Invalid input",
     *     ),
     *     security={{"petstore_auth":{"write:pets", "read:pets"}}}
     * )
     */

图片描述

阅读 4.3k
1 个回答

找了好久,终于知道了 in="formData"

ok

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进