lube/api-generator-bundle

Generates REST Api from Doctrine Entities

0.2.0 2016-12-07 14:06 UTC

This package is not auto-updated.

Last update: 2024-03-16 16:36:35 UTC


README

WARNING! Bundle now in development, not for use in production environment!

Latest Stable Version Total Downloads License

The ApiGeneratorBundle bundle allows you to generate JSON CRUD APIs for your doctrine entities, with json schemas derived from Doctrine Metadata, Annotations and the Symfony Validator component.

Documentation

For documentation, see:

Resources/doc/

Read the documentation

Installation

Install through composer:

First step: require bundle

composer require lube/api-generator-bundle

Second step: enable bundle

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new JMS\AopBundle\JMSAopBundle(),
        new JMS\SerializerBundle\JMSSerializerBundle(),
        new JMS\DiExtraBundle\JMSDiExtraBundle($this),

        new Knp\JsonSchemaBundle\KnpJsonSchemaBundle(),
        new HadesArchitect\JsonSchemaBundle\JsonSchemaBundle(),

        new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
        new Lube\GeneratorBundle\LubeGeneratorBundle(),
    );
}

Usage

$ app/console api:generate:json
$ app/console api:generate

API endpoints are now available, check the generated controllers and test the endpoints!

Contributing

See CONTRIBUTING file.

Credits

The design is heavily inspired by the Doctrine CRUD Generator.

This bundle relies on JMSSerializer, JMSDiExtraBundle, NelmioApiDocBundle, JsonSchemaBundle.

License

This bundle is released under the MIT license. See the complete license in the bundle:

Resources/meta/LICENSE