You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Laravel Swagger
2
2
3
-
This package scans your laravel project's routes and auto generates a Swagger 2.0 documentation for you. If you inject Form Request classes in your controller's actions as request validation, it will also generate the parameters for each request that has them. It will take into account wether the request is a GET/HEAD/DELETE or a POST/PUT/PATCH request and make its best guess as to the type of parameter object it should generate. It will also generate the path parameters if you route contains them.
3
+
This package scans your laravel project's routes and auto generates a Swagger 2.0 documentation for you. If you inject Form Request classes in your controller's actions as request validation, it will also generate the parameters for each request that has them. It will take into account wether the request is a GET/HEAD/DELETE or a POST/PUT/PATCH request and make its best guess as to the type of parameter object it should generate. It will also generate the path parameters if you route contains them. Finally, this package will also scan any documentation you have in your action methods and add it as description to that path, along with any appropriate annotations such as @deprecated.
4
4
5
5
## Installation
6
6
@@ -30,6 +30,11 @@ Say you have a route `/api/users/{id}` that maps to `UserController@show`
30
30
31
31
Your sample controller might look like this:
32
32
```php
33
+
/**
34
+
* Return all the details of a user
35
+
*
36
+
* @deprecated
37
+
*/
33
38
class UserController extends Controller
34
39
{
35
40
public function show(UserShowRequest $request, $id)
@@ -68,7 +73,9 @@ Running `php artisan laravel-swagger:generate > swagger.json` will generate the
0 commit comments