问题
Im using Nelmio API Doc Bundle to expose my api documentation. I use it with base configuration. Also using Symfony 3.1. But on controller even when i define the input parameter inside ApiDoc annotation the documentation does not show the input.
* @ApiDoc(
* section="Customer",
* description="Request reset password",
* input="AppBundle\Form\ResendConfirmationEmailType",
* statusCodes={
* 200="Returned when successful",
* 500="Returned on not found Customer"
* },
* tags={
* "beta" = "#4A7023",
* "v2" = "#ff0000"
* }
* )
There is any configuration im missing? or any known bug?
Thanks
回答1:
It's a known bug. https://github.com/nelmio/NelmioApiDocBundle/issues/208 And it's not really a bug, rather it's outdated approach, used in Symfony up to 2.6, I believe.
The solution is simple - declare you FormType as a service, use, implement a getName
for it, and then use an alias in input.
* input="resend_confirmation_type",
来源:https://stackoverflow.com/questions/39970233/nelmio-api-doc-bundle-not-render-input-type