parameters:
- in: "body"
name: "body"
description: "Pet object that needs to be added to the store"
required: true
schema:
$ref: "#/definitions/Pet"
- in: "header"
name: "user"
description: "username in header paramter"
required: false
在示例的POST请求中添加以上代码行
https://editor.swagger.io/
这给我一个错误
答案 0 :(得分:0)
您的标头参数需要一个type
。
- in: "header"
name: "user"
description: "username in header paramter"
required: false
type: string # <-----------