LimoncelloBundle is an integration bundle for neomerx/json-api and Symfony.
- Download LimoncelloBundle using composer
$ composer require plehatron/limoncello-bundle "dev-master@dev"
- Enable the bundle
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Plehatron\LimoncelloBundle\PlehatronLimoncelloBundle(),
// ...
);
}
See CategorySchema file from integration tests for an example on how to write JSON API Schema classes.
Register a map of schema and corresponding entity classes:
# app/config.yml
# ...
plehatron_limoncello:
schemas:
ApiBundle\Entity\Category: ApiBundle\Schema\CategorySchema
API controllers should extend abstract \Plehatron\LimoncelloBundle\Controller\JsonApiController
class which has full JSON API support provided by the
neomerx/limoncello package.
See CategoryController file for an example on how to write JSON API Controllers,
This bundle is following Semantic Versioning scheme.
Run tests with:
$ vendor/bin/phpunit
This bundle is loosely based on elytus-limoncello-bundle.
Apache License (Version 2.0). Please see License File for more information.