[API] Internal DB IDs used as parameters
- 主要語言
- Java
- 星號
- 3.1k
- 分支
- 1.4k
- 平均合併
- 6 天 19 小時
- 30 天內合併 PR
- 32
描述
##### ISSUE TYPE
* Improvement Request
##### COMPONENT NAME
~~~
API
~~~
##### CLOUDSTACK VERSION
~~~
Any
~~~
##### CONFIGURATION
N/A
##### OS / ENVIRONMENT
N/A
##### SUMMARY
The API accepts internal database IDs as well as UUIDs on the UUID parameters. For example:
````
(nvs) 🐱 > list accounts id=c3d932e5-488c-11ef-a188-3e7340e5df3c filter=id,name
{
"account": [
{
"id": "c3d932e5-488c-11ef-a188-3e7340e5df3c",
"name": "nicolas"
}
],
"count": 1
}
(nvs) 🐱 > list accounts id=2 filter=id,name
{
"account": [
{
"id": "c3d932e5-488c-11ef-a188-3e7340e5df3c",
"name": "nicolas"
}
],
"count": 1
}
(nvs) 🐱 > list accounts id=3 filter=id,name
{
"account": [
{
"id": "eef0d0a3-8013-4c37-954d-eafb96716c95",
"name": "baremetal-system-account"
}
],
"count": 1
}
````
##### EXPECTED RESULTS
~~~
ERROR - only UUIDs must be accepted
~~~
##### ACTUAL RESULTS
~~~
Successful API response
~~~
貢獻指南
研究方向
先重現文件中記載的 list accounts 呼叫,將 id 分別設定為 UUID、2 和 3,然後追蹤 UUID 參數的 API 參數驗證與查找路徑。當數值型內部資料庫 ID 被以錯誤拒絕,而有效的 UUID 仍然回傳 account 時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- api, backend
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100