Api#resourceByAssetID does not support same options as in documentation
@adimiz1 is already working on this.
Since Feb 6, 2025.
Assessment
This issue has not been assessed yet.
Description
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
- Dominant language
- Java
- Stars
- 176
- Forks
- 113
- Avg merge
- 9d 20h
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudinary/cloudinary_java
-
`options` map modified directlyMay be free again @adimiz1 claimed this 481 days ago, and no pull request is open. Open
cloudinary/cloudinary_java#383 · 3 comments · 1 reaction · 1 assignee ·
-
Readme - Maven dependencyMay be free again @adimiz1 claimed this 754 days ago, and no pull request is open. Open
cloudinary/cloudinary_java#349 · 1 comment · 1 assignee ·
-
cloudinary-http5 ignores system propertiesMay be free again @adimiz1 claimed this 754 days ago, and no pull request is open. Open
cloudinary/cloudinary_java#348 · 2 comments · 1 assignee ·
-
Make usage of http clients (apache, OkHttp, Jetty, Asynch) easierMay be free again @ManishS6 claimed this 772 days ago, and no pull request is open. Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
cloudinary/cloudinary_java#343 · 6 comments ·
-
Missing contributing guidelinesMay be free again @debnath003 claimed this 768 days ago, and no pull request is open. Open
cloudinary/cloudinary_java#339 · 2 comments · 1 assignee ·
All issues in cloudinary/cloudinary_java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Backblaze/b2-sdk-java#248 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
IETF-Hackathon/pqc-certificates#351 ·
Maintainers usually reply within 2 days
-
hermes-queue
Difficulty 2/5 Under an hour Newbie friendliness 72/100
chrisalunlloyd2-sudo/mindpalace#393 ·
Maintainers usually reply within 1 day