Download the PHP package macpaw/behat-nelmio-describer without Composer
On this page you can find all versions of the php package macpaw/behat-nelmio-describer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package behat-nelmio-describer
Behat Nelmio Describer
Version | Build Status | Code Coverage |
---|---|---|
master |
||
develop |
Installation
Step 1: Install Bundle
Open a command console, enter your project directory and execute:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
Step 3: Create Behat Nelmio Describer Config:
config/packages/behat_nelmio_describer.yaml
Configurating behat nelmio describer
Step 4: Add annotation to controller [OPTIONAL]
Step 5: Add annotation to route
For each anchor path from config, path from BehatFeaturesPath annotation (optional) and path/filename from BehatFeature annotation are concatenated to find the right feature file.
Additionally, each BehatFeature annotation represents folder in api doc which contains all sample responses defined by anchors.
An example of usage
If your feature file is located in src/tests/Behat/Features/api/version/route/example.feature
Configuration
Used in Controller:
Update your feature file:
Contains following snippets:
Now in Api Doc see response payload your test:

All versions of behat-nelmio-describer with dependencies
nelmio/api-doc-bundle Version ^4.0
symfony/dependency-injection Version ^5.4 || ^6.0 || ^7.0
symfony/config Version ^5.4 || ^6.0 || ^7.0
symfony/routing Version ^5.4 || ^6.0 || ^7.0