我有一个返回字符串数组(即不是对象)的 REST 服务。Apiary 的相关蓝图降价如下:
+ Model (application/json)
+ Body
[
"element1",
"element2",
"element3"
]
+ Schema
{
"type": "array",
"items": {
"type": "string"
}
}
当我在 Apiary 中运行模拟服务时,它可以工作,但在 apiary 流量检查器中出现以下错误:
This API request was compared to a documented resource but was found invalid.
Check your request headers and body below.
...
JSON schema is not valid! invalid type: object (expected [object Object]/array)
at path "/items"
有没有办法让它工作(对降价的更改),或者这是 Apiary 的错误?