dasnonap / blog-app

1 stars 1 forks source link

Laravel Swagger #5

Open dasnonap opened 5 months ago

dasnonap commented 5 months ago
dasnonap commented 5 months ago

How to setup:

dasnonap commented 5 months ago

OA annotation method example:

/**
 * @OA\Patch(
 *     path="/profile",
 *     summary="Update user information",
 *     tags={"Users"},
 *     @OA\Parameter(
 *         name="request",
 *         in="query",
 *         description="Request object",
 *         required=true,
 *         @OA\Schema(
 *             type="object",
 *             @OA\Items(type="integer")
 *         )
 *     ),
 *     @OA\Response(response=200, description="Profile Updated"),
 *     @OA\Response(response=400, description="Invalid request")
 * )
 */
 public function update(/*****/){

OA controller Info:

/**
 * @OA\Info(title="ProfileController", version="0.1")
 */
class ProfileController extends Controller