我有以下yaml
/orgs:
post:
produces: ['application/json']
consumes: ['application/json']
parameters:
- in: query
name: newKey
type: boolean
- in: body
name: org
required: true
schema:
$ref: '#/definitions/Org'
responses:
201:
schema:
$ref: '#/definitions/Org'
在编辑器的“Try This”表单中,POST 的预览看起来是正确的(JSON 在 post body 中,并且 content-type 是正确的):
[
但是当我点击“发送请求”按钮时,它似乎将 JSON 作为 url 编码的字符串放入而不发送正文。
我今天克隆了 swagger-editor,构建它并将它放在我的服务器中以在本地托管它并尝试我正在构建的 API。
为什么将正文作为 url 编码的字符串发送?