1
我正在使用此library。我想在我的网址的可选参数Swagger注释中可选的路径参数
比如我有这条路线
$app->get('/files/{order:\d+}[/{all:0|1|all}]', 'myctroller');
我的注释是
/**
* @SWG\Get(path="/doc/v1/files/{id_ordine}/{all}",
* tags={"GETFILE"},
* produces={"application/json"},
* @SWG\Parameter(
* name="order",
* in="path",
* type="integer",
* required=true,
* default="123",
* ),
* @SWG\Parameter(
* name="all",
* in="path",
* type="string",
* enum={"0","1","all"},
* default="all",
* required=false,
* ),
* @SWG\Response(response="200", description=xxx"),
* @SWG\Response(response="404", xxx")
*)
*/
随着Chrome和与this plugin我可以用我的文档做卷曲。 如果我选择用0值我所有的卷发像
http://localhost/doc/v1/files/123/{all}
我想有一个像
http://localhost/doc/v1/files/123