From c4dbda2b6ffffbca5e19b2cb351bf6bb5201bca6 Mon Sep 17 00:00:00 2001 From: William DURAND Date: Thu, 12 Apr 2012 19:10:02 +0200 Subject: [PATCH] Updated README --- README.md | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/README.md b/README.md index c06d55f..386d18f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,116 @@ NelmioApiDocBundle ================== +## Installation ## +Register the namespace in `app/autoload.php`: + + // app/autoload.php + $loader->registerNamespaces(array( + // ... + 'Nelmio' => __DIR__.'/../vendor/bundles', + )); + +Register the bundle in `app/AppKernel.php`: + + // app/AppKernel.php + public function registerBundles() + { + return array( + // ... + new Nelmio\ApiDocBundle\NelmioApiDocBundle(), + ); + } + +Import the routing definition in `routing.yml`: + + # app/config/routing.yml + NelmioApiDocBundle: + resource: "@NelmioApiDocBundle/Resources/config/routing.yml" + prefix: / + +Enable the bundle's configuration in `app/config/config.yml`: + + # app/config/config.yml + nelmio_api_doc: ~ + + +## Usage ## + +### ApiDoc() annotation ### + +The bundle provides an `ApiDoc()` annotation for your controllers: + +``` php +