API在正文和查询中都有参数,我需要像下面那样在招摇中定义:
parameters: [
{
"name": "businessCode",
"in": "query",
"required": true,
"type": "string",
},
{
"name":"clientCode",
"in":"query",
"required":true,
"type":"string",
},
{
"name":"client",
"in":"body",
"required":true,
}
]
答案 0 :(得分:0)
我认为这很简单,你已经举了一个例子。这是另一个恰当的例子。
parameters: [{
name: "id",
description: "id of something",
required: true,
type: "Id",
paramType: "query"
},
{
name: "Body",
description: "any data",
required: true,
type: "User", //define this model in model file
paramType: "body"
}]