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...

j0k
  • 22,600
  • 28
  • 79
  • 90
Fernando P. G.
  • 191
  • 2
  • 15

1 Answers1

0

use filters key instead of parameters

 * filters={
 *     {"name"="parameter_name", "dataType"="integer"},
 * },
Maciej Pyszyński
  • 9,266
  • 3
  • 25
  • 28
  • Yes, I am using this now, but filters are not the same as parameters... Is there any posibility to use parameters? Thanks!!! – Fernando P. G. Feb 01 '13 at 18:32