API の 1 つにカスタム ルート名を定義しようとしましたが、それ以来、API Doc にそのルートが 2 回表示されます。理由はありますか?
私の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