mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 23:59:26 +03:00
Update README.md
This commit is contained in:
parent
08eebf0fa0
commit
3c43cc5d07
14
README.md
14
README.md
@ -226,7 +226,7 @@ input is used, so you can configure their priorities via container tags. Here's
|
|||||||
#app/config/config.yml
|
#app/config/config.yml
|
||||||
services:
|
services:
|
||||||
mybundle.api_doc.extractor.custom_parser:
|
mybundle.api_doc.extractor.custom_parser:
|
||||||
class: MyBundle\Parser\CustomDocParser;
|
class: MyBundle\Parser\CustomDocParser
|
||||||
tags:
|
tags:
|
||||||
- { name: nelmio_api_doc.extractor.parser, priority: 2 }
|
- { 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:
|
motd:
|
||||||
template: AcmeApiBundle::Components/motd.html.twig
|
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,
|
If you have developed your own project-related annotations, and you want to parse them to populate
|
||||||
you can provide custom handlers as services. You juste have to implements the
|
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`.
|
`Nelmio\ApiDocBundle\Extractor\HandlerInterface` and tag it as `nelmio_api_doc.extractor.handler`:
|
||||||
|
|
||||||
# app/config/config.yml
|
# app/config/config.yml
|
||||||
services:
|
services:
|
||||||
mybundle.api_doc.extractor.my_annotation_handler:
|
mybundle.api_doc.extractor.my_annotation_handler:
|
||||||
class: MyBundle\AnnotationHandler\MyAnnotationHandler;
|
class: MyBundle\AnnotationHandler\MyAnnotationHandler
|
||||||
tags:
|
tags:
|
||||||
- { name: nelmio_api_doc.extractor.handler }
|
- { 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 ##
|
## Credits ##
|
||||||
|
Loading…
x
Reference in New Issue
Block a user