【发布时间】:2017-03-20 09:11:25
【问题描述】:
我正在使用 YAML 在 Swagger Editor 中进行 API 定义。我试图代表以下响应正文:
{
success: true,
ids: [123456, ...]
}
这就是我的 YAML 的样子:
definitions:
SuccessfulResponse:
type: object
properties:
success:
type: boolean
description: True if the all operations were successful
ids:
type: array
items:
id:
type: string
我尝试了几种不同的方法,但像这样,但似乎没有任何效果
如何正确描述上面给出的返回对象?
【问题讨论】: