我正在使用带有 Nelmio API DOC 与 3 的 Symfomy 3.4。
我有一个 GET API,其乘数参数的格式为:multiplier[14]=2&multiplier[15]=1。我希望能够使用数组的键从 /api-doc 面板发出请求,而不仅仅是值。此时,我只能添加值。
我此时定义关系的方式是:
* @SWG\Parameter(
* name="multiplier",
* in="query",
* type="array",
* description="multiply the received reward",
* @SWG\Items(
* type="integer",
* ),
* required=false
* )
我尝试了几件事,比如
* @SWG\Property(
* type="string"
* ),
但它似乎不起作用。
如何使密钥出现在面板中以便我可以在那里完成它,而不使用外部的东西,例如邮递员?