在没有模型引用的情况下,如何在主体中为请求编写自夸文档?
例如:
@SWG\Parameter( name="date", in="body", content="application/json", type="object", {custom written JSON} )
我试过用描述的方式来描述,但这行不通。 因为它必须在 Edit Value 字段。
Edit Value
类似的要求,也一样。
我搜索过谷歌,但没有找到解决方案。 这样的事情有可能吗?
你可以这样做,但不是很明显。这对我很有用:
/** * @SWG\Get( * path="/route", * tags={"tag"}, * @SWG\Response( * response="200", * description="Simple list of name and value pairs ", * @SWG\Schema( * type="array", * @SWG\Items( * @SWG\Property( * property="id", * type="string" * ), * @SWG\Property( * property="name", * type="string" * ) * ) * ) * ) * ) */