How to tell Symfony 3 to ignore certain annotations?

前端 未结 2 739
耶瑟儿~
耶瑟儿~ 2021-01-18 03:37

I\'m developing an API with Symfony 3 and I want to use apidoc to create a documentation. Apidoc works with annotations:

/**
 * @api {get} /user/:id Request          


        
2条回答
  •  别那么骄傲
    2021-01-18 04:01

    There is also a way to ignore an annotation globally. We didn't want to annotate each class, so we added this to our bootstrap file web/app.php.

    Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('your-custom-annotation');
    

提交回复
热议问题