0

I create an API RESTfull using Symfony2.1 with FOSRESTBundle and I am using NelmioApiDocBundle to generate automatic documentation.

I have a PUT request in which the user should send one parameter, but I don't need to create a Form for this purpose. All works perfectly but when I generate the documentation I don't know how to add this parameter to the documentation because I don't have a 'input' form.

I tried this but seems doesn't work:

 /**
 * @ApiDoc(
 *  description="description",
 *  statusCodes={
 *         200="Success",
 *         400="Bad request"},
 *  parameters={
 *         {"name"="parameter_name", "dataType"="integer"}
 *  }
 * )
 ...

In the documentation of NelmioApiDocBundle I didn't see any solution for this...

4

1 回答 1

0

使用过滤器键而不是参数

 * filters={
 *     {"name"="parameter_name", "dataType"="integer"},
 * },
于 2013-02-01T16:40:39.177 回答