这是我的意见:
parameters:
- name: body
in: body
required: true
type: object
description: |
The body.
schema:
$ref: '#/definitions/CsrRequest'
它说:
详细
Object
code: "ONE_OF_MISSING"
message: "Not a valid parameter definition"
path: Array [5]
inner: Array [2]
level: 900
type: "Swagger Error"
description: "Not a valid parameter definition"
lineNumber: 24
我做错了什么?
答案 0 :(得分:4)
您需要根据here从正文中移除type: object
。
parameters:
- name: body
in: body
required: true
description: |
The body.
schema:
$ref: '#/definitions/CsrRequest'