我尝试为我的一个 API 定义自定义路由名称,从那时起,API Doc 显示该路由两次。任何想法为什么?
这是我的 API 的定义:
/**
* @ApiDoc(
* description = "Sends the support email to the HelpDesk address",
* statusCodes = {
* 204 = "Returned when successful",
* 400 = "Returned when the parameters are incorrect",
* 401 = "Returned when the token is invalid",
* 500 = "Returned when there's an internal server error"
* },
* input="AppBundle\Form\Type\SupportEmailType"
* )
* @Post("/support-requests")
* @Rest\View ()
*/
public function postSupportAction(Request $request)
这是我的routing.yml
文件:
# app/config/routing.yml
app:
resource: "@AppBundle/Controller/"
type: annotation
NelmioApiDocBundle:
resource: "@NelmioApiDocBundle/Resources/config/routing.yml"
prefix: /api/doc
user:
type: rest
resource: AppBundle\Controller\UserController