23
23
24
24
## Introduction
25
25
26
- This plugin is designed to generate documentation for your REST API during the
26
+ This plugin is designed to generate documentation for your REST API during the
27
27
passing PHPUnit tests.
28
28
29
29
## Installation
@@ -35,11 +35,11 @@ composer require ronasit/laravel-swagger
35
35
```
36
36
37
37
> *** Note***
38
- >
38
+ >
39
39
> For Laravel 5.5 or later the package will be auto-discovered.
40
40
> For older versions add the ` AutoDocServiceProvider ` to the
41
41
> providers array in ` config/app.php ` as follow:
42
- >
42
+ >
43
43
> ``` php
44
44
> 'providers' => [
45
45
> ...
@@ -62,7 +62,9 @@ composer require ronasit/laravel-swagger
62
62
63
63
4 . Add ` \RonasIT\AutoDoc\Traits\AutoDocTestCaseTrait ` trait to your ` tests/TestCase.php ` class
64
64
5 . Configure documentation saving using one of the next ways:
65
- - Add ` SwaggerExtension ` to the ` <extensions> ` block of your ` phpunit.xml ` .
65
+ - Add ` SwaggerExtension ` to the ` <extensions> ` block of your ` phpunit.xml ` .
66
+ ** Please note that this way will be removed after updating**
67
+ ** PHPUnit up to 10 version (https://github.com/sebastianbergmann/phpunit/issues/4676 )**
66
68
67
69
``` xml
68
70
<phpunit >
@@ -72,8 +74,8 @@ composer require ronasit/laravel-swagger
72
74
</extensions >
73
75
</phpunit >
74
76
```
75
- - Call ` php artisan swagger:push-documentation ` console command after
76
- the ` tests ` stage.
77
+ - Call ` php artisan swagger:push-documentation ` console command after
78
+ the ` tests ` stage.
77
79
78
80
## Usage
79
81
@@ -137,7 +139,7 @@ composer require ronasit/laravel-swagger
137
139
> Plugin will take validation rules from the request class and generate fields description
138
140
> of input parameter.
139
141
140
- 1 . Implement request handling in the corresponding controller class:
142
+ 2 . Implement request handling in the corresponding controller class:
141
143
142
144
```php
143
145
<?php
@@ -157,12 +159,12 @@ composer require ronasit/laravel-swagger
157
159
}
158
160
```
159
161
160
- > ***Note***
161
- >
162
- > Dependency injection of the request class is optional, but if it isn't present,
163
- > the ' Parameters' block in the API documentation will be empty.
162
+ > ***Note***
163
+ >
164
+ > Dependency injection of request class is optional but if it not presents,
165
+ > the " Parameters" block in the API documentation will be empty.
164
166
165
- 3. Create a test for the API endpoint:
167
+ 3. Create test for API endpoint:
166
168
167
169
```php
168
170
public function testUpdate()
@@ -181,7 +183,7 @@ composer require ronasit/laravel-swagger
181
183
5. Go to the route which is defined in the `auto-doc.route` config
182
184
6. Profit!
183
185
184
- 
186
+ 
185
187
186
188
### Annotations
187
189
@@ -225,5 +227,4 @@ can be found in the [Contributing guide](CONTRIBUTING.md).
225
227
226
228
## License
227
229
228
- Laravel Swagger plugin is open-sourced software licensed under the [MIT license](LICENSE).
229
-
230
+ Laravel Swagger plugin is open-sourced software licensed under the [MIT license](LICENSE).
0 commit comments