nelmio/api-doc-bundle
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
phpdocumentor/reflection-docblock | 5.4.0 | - | MIT | prod dev | |
psr/cache | 3.0.0 | 6.01 kB | MIT | prod dev | |
psr/container | 2.0.2 | 3.55 kB | MIT | prod dev | |
psr/log | 3.0.0 | 6.77 kB | MIT | prod dev | |
symfony/cache | v7.0.7 | - | MIT | prod dev | |
symfony/config | v7.0.7 | - | MIT | prod dev | |
symfony/console | v7.0.7 | - | MIT | prod dev | |
symfony/dependency-injection | v7.0.7 | - | MIT | prod dev | |
symfony/deprecation-contracts | v3.5.0 | - | MIT | prod dev | |
symfony/framework-bundle | v7.0.7 | - | MIT | prod | |
symfony/http-foundation | v7.0.7 | - | MIT | prod dev | |
symfony/http-kernel | v7.0.7 | - | MIT | prod dev | |
symfony/options-resolver | v7.0.7 | - | MIT | prod | |
symfony/property-info | v7.0.7 | - | MIT | prod dev | |
symfony/routing | v7.0.7 | - | MIT | prod dev | |
zircote/swagger-php | 4.9.2 | - | Apache-2.0 | prod |
The NelmioApiDocBundle package is an incredible tool that empowers you to generate comprehensive documentation for your APIs. The bundle creates API documentation from annotations seamlessly, making it an invaluable asset for developers seeking to offer clear, easy-to-understand API guidelines.
Getting the NelmioApiDocBundle up and running is easy. To install, open a command console and navigate to your project's directory. Then, execute this command to download the latest version of the bundle: composer require nelmio/api-doc-bundle
. That's it!
Remember, NelmioApiDocBundle's Version 4.0 offers OpenAPI 3.0 support, so if you wish to stay with Swagger 2.0, you should use Version 3 of this bundle.
Here is a basic example of its usage in your PHP code:
use Nelmio\ApiDocBundle\Annotation as Doc;
/**
* @Doc\ApiDoc(
* description="Returns a collection of Object",
* output= {
* "class"=Object::class,
* "collection"=true
* },
* statusCodes={
* 200="Returned when successful"
* }
* )
*/
public function cgetAction(){ /* ... */ }
It's as simple as that! This example illustrates how you can leverage annotations to generate API documentation effectively.
You can find the NelmioApiDocBundle's extensive documentation at Symfony's official site. The guide provides a thorough walk-through on how to utilize the bundle's features and functionalities effectively, ensuring you're able to create stunning API documentation without a hitch. Follow this link to access the official documentation for NelmioApiDocBundle.