You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add AssetFields() to support CDA asset_fields[] parameter
Add AssetFields(params string[] fields) across Entry, Query, Asset, and
AssetLibrary to support the Content Delivery API (CDA) asset_fields[]
query parameter. This enables requesting specific asset-related metadata
(user_defined_fields, embedded, ai_suggested, visual_markups) when
fetching entries or assets.
Changes:
- Entry: AssetFields() before Fetch (single entry).
- Query: AssetFields() before Find (entries).
- Asset: AssetFields() before Fetch (single asset).
- AssetLibrary: AssetFields() before FetchAll (assets).
Behavior: when called with one or more fields, sets asset_fields[] in
the request; when called with no arguments, null, or empty array, the
parameter is not set. Method returns this for chaining.
Tests:
- Unit tests (Contentstack.Core.Unit.Tests): 24 tests across Entry,
Query, Asset, AssetLibrary (single/multiple fields, chaining,
no-args/null/empty-array).
- API tests (Contentstack.Core.Tests): AssetFields request success,
chaining with IncludeMetadata, and scenarios mirroring unit tests
(single field, no args, null, empty array) for Entry, Query, Asset,
and AssetLibrary.
Version: 2.26.0 (Directory.Build.props, CHANGELOG.md).
0 commit comments