Generates documentation for your REST API from annotations
Find a file
2016-11-30 16:06:20 +01:00
DependencyInjection Make most classes final 2016-11-30 15:05:57 +01:00
Describer Make most classes final 2016-11-30 15:05:57 +01:00
Resources/config Allow to filter routes based on their path 2016-11-30 14:54:04 +01:00
RouteDescriber Fix usage of FOS QueryParam::getKey() that is protected since 1.8 2016-11-30 16:06:20 +01:00
Routing Allow to filter routes based on their path 2016-11-30 14:54:04 +01:00
Tests Allow to filter routes based on their path 2016-11-30 14:54:04 +01:00
.gitignore Transform in a bundle 2016-07-12 00:33:55 +02:00
.php_cs Fix CS 2016-07-30 20:04:03 +02:00
.styleci.yml Fix CS 2016-07-30 20:04:03 +02:00
.travis.yml Add type hints 2016-07-15 00:40:30 +02:00
ApiDocGenerator.php Make ApiDocGenerator final 2016-11-30 15:10:01 +01:00
composer.json Bump exsyst/swagger version 2016-11-18 22:30:45 +01:00
EXSystApiDocBundle.php Make most classes final 2016-11-30 15:05:57 +01:00
LICENSE Initial commit 2016-06-30 20:07:51 +02:00
phpunit.xml.dist Transform in a bundle 2016-07-12 00:33:55 +02:00
README.md Improve the readme 2016-11-18 18:00:09 +01:00

ApiDocBundle

[WIP] Generates Swagger docs from several sources

Installation

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

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

And then add it to your kernel:

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

            new EXSyst\Bundle\ApiDocBundle\ApiDocBundle(),
        ];

        // ...
    }
}

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('exsyst_api_doc.generator');
$swagger = $generator->generate()->toArray();

What's supported?

This bundle supports Symfony route requirements, PHP annotations, Swagger-Php annotations, NelmioApiDocBundle annotation, 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.