exsyst / api-doc-bundle
[WIP] Generates Swagger docs from several sources
Installs: 59
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 5
Forks: 0
Open Issues: 1
Type:symfony-bundle
Requires
- php: ^7.0
- exsyst/swagger: ~0.2.2
- symfony/framework-bundle: ^3.2
Requires (Dev)
- api-platform/core: dev-master
- doctrine/annotations: ^1.2
- friendsofsymfony/rest-bundle: ^2.0
- nelmio/api-doc-bundle: ^2.0
- phpdocumentor/reflection-docblock: ^3.1
- phpunit/phpunit: ^5.4
- sensio/framework-extra-bundle: ^3.0
- symfony/browser-kit: ^3.2
- symfony/cache: ^3.2
- symfony/config: ^3.2
- symfony/phpunit-bridge: ^3.2
- symfony/property-access: ^3.2
- symfony/twig-bundle: ^3.2
- symfony/validator: ^3.2
- zircote/swagger-php: ^2.0
Suggests
- api-platform/core: For using an API oriented framework.
- friendsofsymfony/rest-bundle: For using the parameters annotations.
- nelmio/api-doc-bundle: For using the ApiDoc annotation.
- phpdocumentor/reflection-docblock: For parsing php docs.
- zircote/swagger-php: For using swagger annotations.
This package is auto-updated.
Last update: 2022-02-01 13:00:25 UTC
README
[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.