我的 API 只使用Header - Content-type:application/json
对象的请求。
为此,我使用:
@OA\RequestBody(
description= "Provide company search parameter",
required= true,
@OA\JsonContent(
type="object",
@OA\Property(property="company_name", type="string")
)
)
但是对于一些我不需要的请求RequestBody
,只需点击资源并获取数据。没有我怎么办RequestBody
?
PS 这个请求需要一个GET
方法(POST
如果有帮助,可以使用),但GET
不接受RequestBody
.