Swagger Installation in Laravel Project

preview_player
Показать описание
Swagger Installation

//run the following commands in commandline
composer require darkaonline/l5-swagger
php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider"

//paste in the .env file

//paste this in the controller

/**
* @OA\Info(
* title="APIs For Thrift Store",
* version="1.0.0",
* ),
* @OA\SecurityScheme(
* securityScheme="bearerAuth",
* in="header",
* name="bearerAuth",
* type="http",
* scheme="bearer",
* bearerFormat="JWT",
* ),
*/
//it will not work until you create a route
php artisan l5-swagger:generate
Рекомендации по теме
Комментарии
Автор

L5_SWAGGER_CONST_HOST
why are we using this ??

yadav-akash
Автор

I get the error no operations defined in spec, why?

Comcha-tjof
Автор

can i delete the comments after generating the swagger?

orphnsx
Автор

Fast, benefit, likely, you saved me dude

azadehghasemi
Автор

Please can you tell me your extension, it's IDE is very good

AnujKumar-pdkj
Автор

Required @OA\PathItem() not found

at
27▕ } else {
28▕ $error_level = E_USER_WARNING;
29▕ }
30▕
➜ 31▕ trigger_error($message, $error_level);
32▕ }
33▕ } -- I am getting this code error everytime, Can you please suggest

shafiqsuhag