Skip to content

Add support for entry variants branch#134

Draft
reeshika-h wants to merge 3 commits into
developmentfrom
feat/DX-7328-variants-branch-support
Draft

Add support for entry variants branch#134
reeshika-h wants to merge 3 commits into
developmentfrom
feat/DX-7328-variants-branch-support

Conversation

@reeshika-h

Copy link
Copy Markdown
Contributor

Introduce support for entry variants and branch handling in API requests. Update documentation with new guidelines for development workflow and coding standards. Remove outdated files and consolidate relevant information into new documentation files. This addresses improvements outlined in issue DX-6046.

@reeshika-h reeshika-h changed the title Add support for entry variants and update documentation Add support for entry variants branch May 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds first-class support for requesting entry variants (via x-cs-variant-uid) and optionally scoping those requests to a branch (via branch) across Entry and Query by moving the API onto the shared EntryQueryable surface. It also expands the test suite with unit coverage for header construction and introduces a new API test + DVR cassette for variants.

Changes:

  • Adds variants(uid:), variants(uids:), and branch-aware overloads on EntryQueryable to set the appropriate request headers.
  • Updates unit tests for Entry and Query to validate variant/branch header formation.
  • Adds EntryVariantsAPITest plus a DVR cassette intended for replay/recording.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Sources/EntryQuaryable.swift Adds the new variants + branch header APIs on EntryQueryable.
Sources/Entry.swift Removes now-redundant variants(...) methods from Entry (covered via EntryQueryable extension).
Tests/QueryTest.swift Adds unit tests for Query.variants(...) header behavior and updates allTests.
Tests/EntryTest.swift Adds unit tests for Entry.variants(..., branch:) header behavior.
Tests/EntryVariantsAPITest.swift Adds integration-style tests for variants + branch, with DVR/live modes.
Tests/DVRRecordings/EntryVariants.json Adds a DVR cassette for variants API calls.
ContentstackSwift.xcodeproj/project.pbxproj Registers the new API test file in the Xcode project/test targets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Tests/EntryVariantsAPITest.swift
Comment thread Tests/EntryVariantsAPITest.swift
Comment thread Tests/EntryVariantsAPITest.swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants