Skip to content

Commit 932d38b

Browse files
authored
Merge pull request #378 from shalvah/v3
Document league/fractal dependency
2 parents 759cb00 + abe32c4 commit 932d38b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ public function createPost()
194194
They will be included in the generated documentation text and example requests.
195195

196196
**Result:**
197+
197198
![](body_params.png)
198199

199200
### Indicating auth status
@@ -260,6 +261,12 @@ public function showUser(int $id)
260261
```
261262
For the first route above, this package will generate a set of two users then pass it through the transformer. For the last two, it will generate a single user and then pass it through the transformer.
262263

264+
> Note: for transformer support, you need to install the league/fractal package
265+
266+
```bash
267+
composer require league/fractal
268+
```
269+
263270
#### Gnerating responses automatically
264271
If you don't specify an example response using any of the above means, this package will attempt to get a sample response by making a request to the route (a "response call"). A few things to note about response calls:
265272
- They are done within a database transaction and changes are rolled back afterwards.

composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@
2828
"orchestra/testbench": "3.5.* || 3.6.* || 3.7.*",
2929
"phpunit/phpunit": "^6.0.0 || ^7.4.0",
3030
"dingo/api": "2.0.0-alpha1",
31-
"mockery/mockery": "^1.2.0"
31+
"mockery/mockery": "^1.2.0",
32+
"league/fractal": "^0.17.0"
33+
},
34+
"suggest": {
35+
"league/fractal": "Required for transformers support"
3236
},
3337
"autoload": {
3438
"psr-4": {

0 commit comments

Comments
 (0)