creads / api2symfony
PHP library to automatically generate Symfony2 controllers from API specifications (RAML, Blueprint, Swagger...)
Installs: 757
Dependents: 1
Suggesters: 0
Security: 0
Stars: 14
Watchers: 2
Forks: 4
Open Issues: 6
pkg:composer/creads/api2symfony
Requires
- alecsammon/php-raml-parser: 0.6.3
- symfony/filesystem: ~2.6
- symfony/twig-bundle: ~2.6
Requires (Dev)
- phpunit/phpunit: 4.*
This package is not auto-updated.
Last update: 2022-02-01 12:42:44 UTC
README
PHP library to automatically generate Symfony2 controllers from API specifications (RAML, Blueprint, Swagger...)
BUT... We only support the following specification formats now:
- RAML
But we'd like to also support:
- Blueprint
- Swagger
Feel free to submit your PRs !
Installation
Using composer:
composer require creads/api2symfony 1.0.*@dev
Use case
//prepare RAML converter $converter = new Creads\Api2Symfony\Converter\RamlConverter(); //prepare dumper $dumper = new Creads\Api2Symfony\Dumper\SymfonyDumper(); //get controller models from specification $controllers = $converter->convert('path/to/spec.raml'); //dump each controller into current directory foreach($controllers as $controller) { $dumper->dump(controller); }
Run tests
composer install --dev php vendor/bin/phpunit
Contributors
Contributing
Feel free to contribute on github by submitting any issue or question on tracker.