diff --git a/README.md b/README.md index 907489fd..0312f10b 100644 --- a/README.md +++ b/README.md @@ -194,6 +194,7 @@ public function createPost() They will be included in the generated documentation text and example requests. **Result:** + ![](body_params.png) ### Indicating auth status @@ -260,6 +261,12 @@ public function showUser(int $id) ``` 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. +> Note: for transformer support, you need to install the league/fractal package + +```bash +composer require league/fractal +``` + #### Gnerating responses automatically 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: - They are done within a database transaction and changes are rolled back afterwards. diff --git a/composer.json b/composer.json index b779797d..79af8ea0 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,11 @@ "orchestra/testbench": "3.5.* || 3.6.* || 3.7.*", "phpunit/phpunit": "^6.0.0 || ^7.4.0", "dingo/api": "2.0.0-alpha1", - "mockery/mockery": "^1.2.0" + "mockery/mockery": "^1.2.0", + "league/fractal": "^0.17.0" + }, + "suggest": { + "league/fractal": "Required for transformers support" }, "autoload": { "psr-4": {