Open dasnonap opened 5 months ago
How to setup:
php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider"
php artisan l5-swagger:generate
http://your-api-project.test/api/documentation
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