Api#resourceByAssetID does not support same options as in documentation
@adimiz1 已經在處理了。
開始於 2025年2月6日。
評估
這個 Issue 還沒有評估資料。
描述
Bug report for Cloudinary Java SDK
Before proceeding, please update to latest version and test if the issue persists
Describe the bug in a sentence or two.
It seems that Api#resourceByAssetID does not support same parameters as describe in documentation.
In Cloudinary Api Docs . E.g image_metadata is described as supported option. Thus, i would expect that
cloudinary.api().resourceByAssetID(asset.asset_id(), Map.of("image_metadata", true)) would result in GET /v1_1/<client>/resources/<asset-id>?image_metadata=true. But actually it results in /v1_1/<client>/resources/<asset-id> without 'image_metadata' parameter.
Api#resourceByAssetID implementation does not match configuration options in documentation.
public ApiResponse resourceByAssetID(String assetId, Map options) throws Exception {
if (options == null) options = ObjectUtils.emptyMap();
if(options.get("fields") != null) {
options.put("fields", StringUtils.join(ObjectUtils.asArray(options.get("fields")), ","));
}
Map params = ObjectUtils.only(options, "tags", "context", "moderations", "fields");
ApiResponse response = callApi(HttpMethod.GET, Arrays.asList("resources", assetId), params, options);
return response;
}
Since with simple curl the api responds with expected image metadata included my guess is that the java implementation is too restrictive.
Issue Type (Can be multiple)
[ ] Build - Can’t install or import the SDK
[ ] Performance - Performance issues
[x ] Behaviour - Functions aren’t working as expected (Such as generate URL)
[ ] Documentation - Inconsistency between the docs and behaviour
[ ] Other (Specify)
Steps to reproduce
… if applicable
Error screenshots or Stack Trace (if applicable)
…
Build System
[ ] Maven
[x ] Gradle
[ ] Other (Specify)
OS (Please specify version)
[ ] Windows
[ ] Linux
[ ] Mac
[ ] Other (specify)
Versions and Libraries (fill in the version numbers)
Cloudinary Java SDK version - 2.0.0
JVM (dev environment) - 0.0.0
JVM (production environment) - 0.0.0
Maven - 0.0.0 / N/A
Gradle - 0.0.0 / N/A
Repository
If possible, please provide a link to a reproducible repository that showcases the problem
- 主要語言
- Java
- 星號
- 176
- 分支
- 113
- 平均合併
- 9 天 20 小時
- 30 天內合併 PR
- 2
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
cloudinary/cloudinary_java 的其他 Issue
-
`options` map modified directly可能重新可做 @adimiz1 於 481 天前認領,目前沒有進行中的 PR。 未關閉
cloudinary/cloudinary_java#383 · 3 則留言 · 1 個 reaction · 已指派 1 人 ·
-
Readme - Maven dependency可能重新可做 @adimiz1 於 754 天前認領,目前沒有進行中的 PR。 未關閉
cloudinary/cloudinary_java#349 · 1 則留言 · 已指派 1 人 ·
-
cloudinary-http5 ignores system properties可能重新可做 @adimiz1 於 754 天前認領,目前沒有進行中的 PR。 未關閉
cloudinary/cloudinary_java#348 · 2 則留言 · 已指派 1 人 ·
-
Make usage of http clients (apache, OkHttp, Jetty, Asynch) easier可能重新可做 @ManishS6 於 772 天前認領,目前沒有進行中的 PR。 未關閉
難度 5/5 一週以上 新手友好度 25/100
cloudinary/cloudinary_java#343 · 6 則留言 ·
-
Missing contributing guidelines可能重新可做 @debnath003 於 768 天前認領,目前沒有進行中的 PR。 未關閉
cloudinary/cloudinary_java#339 · 2 則留言 · 已指派 1 人 ·
查看 cloudinary/cloudinary_java 的全部 Issue
相似的 Issue
-
bug(core): skip_nodes.json is missing SELECT and PRE, causing Python and Java to insert separators into dropdown options and preformatted text可能已有人在做 @Bhumit267 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆
-
ExceptionThrowShouldUseContext: NullPointerException on a catch block inside an annotation type可能已有人在做 @Carbon14-48 今天認領。 未關閉approved
難度 2/5 1-3 小時 新手友好度 72/100
checkstyle/checkstyle#22784 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
ASSERT-KTH/depclean#591 ·
維護者通常 1 天內回覆
-
Api537FlareFlameModel.setStackHeightM accepts a negative height可能已有人在做 @EvenSol 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆