我正在尝试构建 RAML 文档(v 1.0),但我在最初阶段就被卡住了。我有供应商资源,我定义如下:
types:
Vendor:
type: object
properties:
name: string
url: string
service_email: string
service_phone: string
image: string
/vendors:
description: foo bar
displayName: Vendor
get:
description: retrieve a list of vendors
responses:
200:
body:
application/json:
type: ???
uniqueItems: true
/{ident}:
get:
description: retrieve a single vendor item identified by ident
responses:
200:
body:
application/json:
type: Vendor
我只是无法弄清楚在 get 请求上为 type 写什么(现在是 ???)api 以 vendor 类型的对象数组进行响应,但我该如何将其传达给 RAML?