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 +