我如何为 POST 方法定义 RAML 规范,该方法将字符串数组作为参数

How can I define a RAML spec for a POST method taking an array of string as parameters

我正在尝试为 restful Web 服务的 post 方法发布 RAML,该方法采用字符串数组。基本上,我想要一个名为 color 的参数,我希望能够传入多个值,例如:

颜色:{蓝色、红色、白色}。所以我想要一个参数但多个值。

虽然我参考了 RAML 教程,但我不确定如何发布 RAML。

任何指点将不胜感激

在 RAML 1 中,您可以这样做:

#%RAML 1.0
title: test
types:
  colour: string[]
/test:
  post:
    body:
      application/json:
        type: colour