Download the PHP package creads/api2symfony-bundle without Composer
On this page you can find all versions of the php package creads/api2symfony-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download creads/api2symfony-bundle
More information about creads/api2symfony-bundle
Files in creads/api2symfony-bundle
Package api2symfony-bundle
Short Description A Symfony bundle to automatically create Symfony controllers from a standard API specification.
License MIT
Homepage http://creads.fr
Informations about the package api2symfony-bundle
Api2Symfony Bundle
A Symfony2 bundle to automatically generate controllers from standard API specifications (RAML, Blueprint, Swagger...)
BUT... We only support the following specification formats now:
- RAML
But we'd like to also support:
- Blueprint
- Swagger
This bundle uses the api2symfony library.
Installation
Using composer:
composer require creads/api2symfony-bundle 1.0.*@dev
Register the bundle by updating AppKernel.php
:
<?php
// in AppKernel::registerBundles()
if (in_array($this->getEnvironment(), ['dev', 'test'])) {
// ...
$bundles[] = new Creads\Api2SymfonyBundle\Api2SymfonyBundle();
// ...
};
Use case
The bundle provides a command:
app/console.php api2symfony:generate:raml path/to/api.raml Some\\Namespace
Example
php app/console.php api2symfony:generate:raml path/to/api.raml Acme\\DemoBundle
New controller dumped at app/cache/dev/api2symfony/Acme/DemoBundle/1_0_1_alpha/PostsController.php
Generated code:
All versions of api2symfony-bundle with dependencies
creads/api2symfony Version 1.0.*@dev
symfony/filesystem Version 2.7.*@dev
symfony/twig-bundle Version 2.7.*@dev