gpt4 book ai didi

Swagger 为 body 参数抛出 "Swagger Error Not a valid parameter definition"

转载 作者:行者123 更新时间:2023-12-02 12:11:03 25 4
gpt4 key购买 nike

这是我的输入:

  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

我做错了什么?

最佳答案

您需要按照 this issue 从正文中删除 type: object .

parameters:
- name: body
in: body
required: true
description: |
The body.
schema:
$ref: '#/definitions/CsrRequest'

关于Swagger 为 body 参数抛出 "Swagger Error Not a valid parameter definition",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36738211/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com