talaka/api-platform-mongodb-bundle

API Platform MongoDB Integration

dev-master 2016-10-19 20:20 UTC

This package is not auto-updated.

Last update: 2024-11-09 20:17:32 UTC


README

This bundle provides a simple integration of the Doctrine MongoDB into API Platform framework.

Installation

Install the latest version with

$ composer require talaka/api-platform-mongodb-bundle

Register the bundle in app/AppKernel.php:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...

        new Talaka\APIPlatform\MongoDBBundle\TalakaAPIPlatformMongoDBBundle(),
    );
}

Configure

app/config/schema.yml

annotationGenerators:
    - Talaka\APIPlatform\MongoDBBundle\AnnotationGenerator\DoctrineMongoDBAnnotationGenerator
namespaces:
    entity: AppBundle\Document # The default namespace for documents,

Usage

$ bin/schema generate-types src/ app/config/schema.yml

License

The TalakaAPIPlatformMongoDBBundle is licensed under the MIT license.