我正在尝试使用apiblueprint。
如何像下面的Laravel代码一样编写apib?
public function getDownload()
{
//PDF file is stored under project/public/download/info.pdf
$file= public_path(). "/download/info.pdf";
$headers = array(
'Content-Type: application/pdf',
);
return Response::download($file, 'filename.pdf', $headers);
}
apib文件
## getDownload [GET]
+ Response 200 (application/pdf)??
答案 0 :(得分:0)
您缺少资源。应该是这样的:
## Resource Title [/path-to-get-the-pdf]
### Download [GET]
+ Response 200 (application/pdf)