我正在使用laravel 5.2.*
并且正在使用darkaonline/l5-swagger : ~3.0
API 的文档。我在标头正文中发送参数,当我看到 Swagger UI 时,它显示如下。
数据类型未定义
有关更多详细信息,请参见下图。
/**
* @SWG\Post(
* path="/api/v1/compaign_attr",
* summary="List compaign attributes",
* @SWG\Parameter(
* name="campaign_id",
* in="body",
* description="ID to fetch the targeted compaigns",
* required=true,
* @SWG\Property(property="request", type="json", example={ "campaign_id": 818, "code":"PLATFORM", "type":"Message"} )
* ),
* @SWG\Parameter(
* name="x-api-key",
* in="header",
* description="api key validation",
* required=true,
* type="string",
* ),
* @SWG\Response(response=200, description="successful operation", @SWG\Property(property="result", type="json", example={ "aa": { "bb", "cc" } } )),
* @SWG\Response(response=401, description="not authorized"),
* @SWG\Response(response=500, description="internal server error")
* )
*
*/