PHPackages                             fusonic/api-documentation-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. fusonic/api-documentation-bundle

ActiveSymfony-bundle

fusonic/api-documentation-bundle
================================

Symfony bundle for automated documentation with NelmioApiDocBundle.

0.3.1(5mo ago)321.5k↓32.7%MITPHPPHP &gt;=8.2

Since Jun 7Pushed 5mo ago7 watchersCompare

[ Source](https://github.com/fusonic/php-api-documentation-bundle)[ Packagist](https://packagist.org/packages/fusonic/api-documentation-bundle)[ RSS](/packages/fusonic-api-documentation-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (21)Versions (22)Used By (0)

fusonic-api-documentation-bundle
================================

[](#fusonic-api-documentation-bundle)

[![License](https://camo.githubusercontent.com/03158d459accf7a6653e5a6e944e6d119fbab8821ea5348af10a88873e1d46ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6675736f6e69632f6170692d646f63756d656e746174696f6e2d62756e646c653f636f6c6f723d626c7565)](https://github.com/fusonic/php-api-documentation-bundle/blob/master/LICENSE)[![Latest Version](https://camo.githubusercontent.com/948ab2f4ad20444009e01935f05f59dc74e0c92cfec4cc60239d1c97d490bf1e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6675736f6e69632f7068702d6170692d646f63756d656e746174696f6e2d62756e646c652e7376673f636f6c6f723d626c7565)](https://github.com/fusonic/php-api-documentation-bundle/releases)[![Total Downloads](https://camo.githubusercontent.com/4de6e9f13bc1c788678e34877864464d18a55efbd2286d36026f353f1f9d8309/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6675736f6e69632f6170692d646f63756d656e746174696f6e2d62756e646c652e7376673f636f6c6f723d626c7565)](https://packagist.org/packages/fusonic/api-documentation-bundle)[![php 8.2+](https://camo.githubusercontent.com/84bd92a1758108a8ea826ec995a24da8fb51bfe1ce4d11f38ea5667da42d69dd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d6d696e253230382e312d626c75652e737667)](https://camo.githubusercontent.com/84bd92a1758108a8ea826ec995a24da8fb51bfe1ce4d11f38ea5667da42d69dd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d6d696e253230382e312d626c75652e737667)

- [About](#about)
- [Install](#install)
- [Usage](#usage)
- [Contributing](#contributing)

About
-----

[](#about)

This bundle makes generating documentation of your (json) API routes easier. It provides a custom route annotation that can parse the input and output model of a route to generate documentation definitions for [NelmioApiDocBundle](https://symfony.com/bundles/NelmioApiDocBundle/current/index.html). If you are using type hints for the input and output it can be detected automatically, see [Usage](#Usage) on how to do this.

With just [NelmioApiDocBundle](https://symfony.com/bundles/NelmioApiDocBundle/current/index.html) you will often find yourself writing many annotations with a repetitive pattern. With this bundle common annotation combinations are bundled into one single route attribute.

This bundle can work well together with the [http-kernel-bundle](https://github.com/fusonic/php-http-kernel-bundle).

Install
-------

[](#install)

Use composer to install the bundle from packagist.

```
composer require fusonic/api-documentation-bundle
```

Requirements:

- PHP 8.2+
- Symfony 5.4+

In case Symfony did not add the bundle to the bundle configuration, add the following (by default located in `config/bundles.php`):

```
