我正在使用Swagger UI创建API文档。我有很多错误,说“不是一个有效的参数定义”,我不知道为什么。谁能说出这是怎么回事?我包括代码的一部分和带有行号和错误描述的图片。
招摇的例子
bool operator<(wahl lhs, wahl rhs);
bool operator>(wahl lhs, wahl rhs);
招摇错误
答案 0 :(得分:2)
当您使用switch (item.getItemId())
{
case android.R.id.home:
finish();
return true;
}
时,规范需要in: body
元素,例如:
schema
如果您使用body参数 ,则需要使用原始值,例如name: user
in: body
schema:
type: object
properties:
userId:
type: string
。