2017-05-13 13:55:13 +02:00
2017-05-13 13:55:13 +02:00
2017-05-13 13:55:13 +02:00
2017-01-14 17:36:56 +01:00
2017-05-13 13:55:13 +02:00
2016-12-29 12:09:26 +01:00
2017-01-14 17:36:56 +01:00
2017-05-13 13:55:13 +02:00
2017-01-25 18:44:57 +01:00
2017-03-15 13:38:23 +01:00
2016-07-30 20:04:03 +02:00
2017-03-15 13:38:23 +01:00
2017-01-14 17:36:56 +01:00
2017-05-13 13:55:13 +02:00
2016-12-29 12:09:26 +01:00
2017-01-14 17:36:56 +01:00
2017-03-15 13:38:23 +01:00
2016-07-12 00:33:55 +02:00
2016-12-29 13:35:36 +01:00
2017-05-13 13:55:13 +02:00
2017-01-09 12:21:53 +01:00

NelmioApiDocBundle

Build
Status Total Downloads Latest Stable
Version

The NelmioApiDocBundle bundle allows you to generate a decent documentation for your APIs.

Installation

Just like any bundle, you have to download it using composer:

composer require nelmio/api-doc-bundle dev-master

And then add it to your kernel:

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            // ...

            new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
        ];

        // ...
    }
}

And that's all, no configuration needed!

What does this bundle?

It generates you a swagger documentation from your symfony app thanks to different sources called Describers. These Describers are specific to a library and extract data from it and merge it into your swagger documentation.

You can fetch your swagger documentation in your app:

$generator = $container->get('nelmio_api_doc.generator');
$swagger = $generator->generate()->toArray();

What's supported?

This bundle supports Symfony route requirements, PHP annotations, the ApiDoc annotation, Swagger-Php annotations, FOSRestBundle annotations and Api-Platform apps.

This bundle is a Work In Progress and as such it does only support input documentation for now (if you use Swagger-Php or Api-Platform, output is supported as well).

What's next?

The hardest part remain: models. We have to build something to manage models that can vary based on several factors (serialization groups, class, etc.) and then put it in the app's documentation.

Other libraries support might be added but the priority is to finalize the bundle first.

Contributing

See CONTRIBUTING file.

Running the Tests

Install the Composer dependencies:

git clone https://github.com/nelmio/NelmioApiDocBundle.git
cd NelmioApiDocBundle
composer update

Then, run the test suite using PHPUnit:

phpunit

License

This bundle is released under the MIT license.

Description
Generates documentation for your REST API from annotations
Readme 17 MiB
Languages
PHP 86.4%
Twig 11%
CSS 2.5%