6
我正在声明RAML中的REST服务API存根。我的网络应用程序提供可以列出的设备,可以通过ID或代码获得。当我想要整个列表时,我没有指定任何URI参数,但是,我需要一个具体的设备。这是它的当前状态:描述RAML中的URI参数
/equipment:
get:
body:
application/json:
application/xml:
description:
List all the equipment
/id/{equipmentId}:
get:
body:
application/json:
application/xml:
description:
Get an equipment by id
/code/{code}:
get:
body:
application/json:
application/xml:
description:
Get an equipment by code
在这里,在description
字段我写什么目前的调用执行。但是,我想为在URI中传递的参数添加说明(id
或code
)。有没有办法实现它?