fix: correct asset_fields[] parameter names for DAM 2.0#337
Merged
AniketDev7 merged 1 commit intodevelopmentfrom Feb 27, 2026
Merged
fix: correct asset_fields[] parameter names for DAM 2.0#337AniketDev7 merged 1 commit intodevelopmentfrom
AniketDev7 merged 1 commit intodevelopmentfrom
Conversation
The previous PR #336 partially fixed asset_fields parameters but used incorrect field names. This commit corrects all parameter names to match the CDA API specification. Changes: - Changed 'ai_suggested' to 'ai_generated_metadata' in all test files - Updated SDK documentation to reflect correct parameter names - All asset_fields tests now pass (verified locally) Valid asset_fields[] values per API: - user_defined_fields - embedded_metadata (not 'embedded') - ai_generated_metadata (not 'ai_suggested') - visual_markups API Error that revealed the issue: "Invalid values found, supported values are user_defined_fields, embedded_metadata, ai_generated_metadata, visual_markups" Files Modified: - test/api/asset.spec.ts - test/api/asset-query.spec.ts - test/api/entry.spec.ts - test/api/entries.spec.ts - src/assets/asset.ts (JSDoc) - src/query/asset-query.ts (JSDoc) - src/entries/entry.ts (JSDoc) - src/entries/entries.ts (JSDoc) Test Results: All 16 asset_fields tests passing (8 API + 8 unit)
65f2289 to
05e621a
Compare
Coverage report
Test suite run success653 tests passing in 31 suites. Report generated by 🧪jest coverage report action from 05e621a |
cs-raj
approved these changes
Feb 27, 2026
netrajpatel
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #336 used incorrect field name ai_suggested. API returns error 141: "Invalid values found, supported values are user_defined_fields, embedded_metadata, ai_generated_metadata, visual_markups"
Solution
Changed ai_suggested → ai_generated_metadata in all test files
Updated JSDoc comments in SDK source files
Test Results
All 16 asset_fields tests passing locally (8 API + 8 unit tests)
Files Modified
test/api/{asset,asset-query,entry,entries}.spec.ts
src/{assets,query,entries}/*.ts (JSDoc only)
Backward Compatible
Tests pass with or without DAM enabled. API accepts but returns empty values when DAM features are disabled.