0
私はちょうどlaravel 5.1(古いプロジェクト)のためにswaggerを設定しました 私のプロジェクトのドキュメントは全部書いてありますが、問題はそれが行くときです。 試してみてください! 空の要求を送信します。 そして、私は郵便配達員とまったく同じことをしようとすると、そのように動作します。空白の投稿要求を送信するスワッガー
これは一例です:
/**
* @SWG\Post(
* path="/api-routes/verify-report",
* consumes={"multipart/form-data"},
* description="Verify report",
* operationId="verifyReport",
* @SWG\Parameter(
* description="Application report id",
* format="int64",
* in="path",
* name="report_id",
* required=true,
* type="string"
* ),
* produces={"application/json"},
* @SWG\Response(
* response="200",
* description="successful operation"
* ),
* summary="Verify report",
* tags={
* "Verify report"
* }
*)
* */
public function verifyReport() {
}
そして私は
"darkaonline/l5-swagger": "~3.0"
「空のリクエスト」とは、本文がないリクエストを意味しますか?もしそうなら、あなたのコードの注釈が、要求のためのパラメータ(この場合は 'in =" formData "パラメータ)を定義していない可能性があります。それとも別のことを意味していますか? – Helen