Swagger

Example in route.php

//Products
/**
	* @OA\Get(
	*      path="/api/v1/product/all",
	*      operationId="product",
	*      tags={"Product"},
	*      summary="取得所有商品",
	*      description="取得所有商品",
	*      security={ {"bearer": {} }},
	*      @OA\Parameter(
	*          name="page",
	*          description="Page number",
	*          required=true,
	*          in="path",
	*          @OA\Schema(
	*              type="integer"
	*          )
	*      ),
	*      @OA\Parameter(
	*          name="page_size",
	*          description="Page size",
	*          required=true,
	*          in="path",
	*          @OA\Schema(
	*              type="integer"
	*          )
	*      ),
	*      @OA\Response(
	*          response=200,
	*          description="請求成功",
	*          @OA\JsonContent(
	*              @OA\Property(property="status", type="string", description="請求狀態, 成功為success, 失敗為fail", example="success"),
	*              @OA\Property(property="data", type="object", 
	*                  @OA\Property(property="rows", type="array", 
	*                      @OA\Items(type="object", 
	*                          @OA\Property(property="id", type="integer", description="商品ID"), 
	*                          @OA\Property(property="cat_id2", type="integer", description="分類ID"), 
	*                          @OA\Property(property="brand_id", type="integer", description="品牌ID"), 
	*                          @OA\Property(property="shop_id", type="integer", description="商店ID"), 
    *                          @OA\Property(property="name", type="string", description="商品名稱"), 
	*                          @OA\Property(property="list_price", type="integer", description="參考售價"), 
	*                          @OA\Property(property="price", type="integer", description="售價"), 
	*                          @OA\Property(property="item_code", type="string", description="料號"), 
	*                          @OA\Property(property="enable_model", type="integer", description="啟用規格"), 
	*                          @OA\Property(property="color", type="string", description="顏色"), 
	*                          @OA\Property(property="thumb", type="string", description="縮圖"), 
	*                          @OA\Property(property="image", type="string", description="主圖"), 
	*                          @OA\Property(property="images", type="string", description="輪播圖"), 
	*                          @OA\Property(property="inventory", type="string", description="庫存"), 
	*                          @OA\Property(property="summary", type="string", description="商品簡介"), 
	*                          @OA\Property(property="description", type="string", description="商品詳細介紹"), 
	*                          @OA\Property(property="online", type="integer", description="是否上線"), 
	*                          @OA\Property(property="online_date", type="string", format="date-time", description="上線日期"), 
	*                          @OA\Property(property="offline_date", type="string", format="date-time", description="下線日期"), 
	*                          @OA\Property(property="hot", type="integer", description="熱門商品"), 
	*                          @OA\Property(property="new", type="integer", description="最新商品"), 
	*                          @OA\Property(property="onsale", type="integer", description="促銷商品"), 
	*                          @OA\Property(property="spec", type="string", description="商品規格介紹"), 
	*                          @OA\Property(property="other_info", type="string", description="商品其它資訊"), 
	*                          @OA\Property(property="note", type="string", description="備註"), 
	*                          @OA\Property(property="tags", type="string", description="標籤"), 
	*                          @OA\Property(property="type", type="integer", description="類型"), 
	*                          @OA\Property(property="sort_order", type="integer", description="排序代碼"), 
	*                          @OA\Property(property="created_at", type="string", format="date-time", description="建立時間"), 
	*                          @OA\Property(property="updated_at", type="string", format="date-time", description="更新時間"), 
	*                          @OA\Property(property="deleted_at", type="string", format="date-time", description="刪除時間")
	*                      )
	*                  ), 
	*                  @OA\Property(property="total_rows", type="integer", example="100", description="資料總數量"),
	*                  @OA\Property(property="page", type="integer", example="1", description="頁數"),
	*                  @OA\Property(property="page_size", type="integer", example="10", description="每一頁顯示資料數量")
	*              )
	*          )
	*      ),
	*      @OA\Response(
	*          response=201,
	*          description="請求失敗",
	*          @OA\JsonContent(
	*              @OA\Property(property="status", type="string", example="fail"),
	*              @OA\Property(property="code", type="string", example="0"),
	*              @OA\Property(property="message", type="string", example="Invalid page.")
	*          )
	*      )
	* )
*/