Update README.md

This commit is contained in:
William Durand 2013-04-18 01:29:56 +03:00
parent 08eebf0fa0
commit 3c43cc5d07

View File

@ -226,7 +226,7 @@ input is used, so you can configure their priorities via container tags. Here's
#app/config/config.yml
services:
mybundle.api_doc.extractor.custom_parser:
class: MyBundle\Parser\CustomDocParser;
class: MyBundle\Parser\CustomDocParser
tags:
- { name: nelmio_api_doc.extractor.parser, priority: 2 }
@ -236,20 +236,20 @@ You can also define your own motd content (above methods list). All you have to
motd:
template: AcmeApiBundle::Components/motd.html.twig
## Using your own annotations ##
## Using Your Own Annotations ##
If you have developped your own project-related annotations, and you want to parse them to populate the ApiDoc,
you can provide custom handlers as services. You juste have to implements the
`Nelmio\ApiDocBundle\Extractor\HandlerInterface` and tag it as `nelmio_api_doc.extractor.handler`.
If you have developed your own project-related annotations, and you want to parse them to populate
the `ApiDoc`, you can provide custom handlers as services. You juste have to implement the
`Nelmio\ApiDocBundle\Extractor\HandlerInterface` and tag it as `nelmio_api_doc.extractor.handler`:
# app/config/config.yml
services:
mybundle.api_doc.extractor.my_annotation_handler:
class: MyBundle\AnnotationHandler\MyAnnotationHandler;
class: MyBundle\AnnotationHandler\MyAnnotationHandler
tags:
- { name: nelmio_api_doc.extractor.handler }
Look at examples in [Handlers](https://github.com/nelmio/NelmioApiDocBundle/tree/annotation_handlers/Extractor/Handler)
Look at the built-in [Handlers](https://github.com/nelmio/NelmioApiDocBundle/tree/master/Extractor/Handler).
## Credits ##