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
)。有沒有辦法實現它?