How can i generate documentation for route like login_check? because there are several routes which are not directally point to any method.
What do you mean by saying "there are several routes which are not directally point to any method"?
like this
in app/routing.yml files
fb_login_check:
path: /facebook/login_check/fb
for above routing pattern there is no controller and action defined. and i wants to generate doc for the above like pattern than how can i do?? i hope i have explained well :)
@ajaypatelbardoli Looks like a route for a login-endpoint. Requests to these routes are intercepted by Symfony's SecurityBundle (read more about). In general, you won't such endpoints to be documented, but interesting question.
@frne agreed but i wish it will be available in next release :)
@ajaypatelbardoli You can define your route using annotations in a controller by creating an empty method (which won't be called because intercepted by the security) but the annotations will work (i think):
//MyController.php
/**
* @ApiDoc(.....)
*
* @Post("/login_check", ....)
*/
public function checkAction(){...}
@ajaypatelbardoli You can define your route using annotations in a controller by creating an empty method (which won't be called because intercepted by the security) but the annotations will work (i think):
//MyController.php /** * @ApiDoc(.....) * * @Post("/login_check", ....) */ public function checkAction(){...}
That helped, thanks so much!!!
Most helpful comment
@ajaypatelbardoli You can define your route using annotations in a controller by creating an empty method (which won't be called because intercepted by the security) but the annotations will work (i think):