APIのカスタムルート名を定義しようとしましたが、それ以来API Docはそのルートを2度表示しています。なぜどんなアイデア?Nelmio 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
役立ちますあなたが同様のrouting.yml設定を投稿することができますか? –
@AlexandruCosoi私はrouting.ymlファイルの内容で質問を更新しました – Sebastian
FOSRestBundleを最後に使用したときは思い出せませんが、私はどこかで2度定義されたルートを持っていると思っていますこの問題:https://github.com/FriendsOfSymfony/FOSRestBundle/issues/813 –