Skip to content

Add support for entry variants branch - #134

Merged
OMpawar-21 merged 3 commits into
developmentfrom
feat/DX-7328-variants-branch-support
Jul 24, 2026
Merged

Add support for entry variants branch#134
OMpawar-21 merged 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-hreeshika-h changed the title Add support for entry variants and update documentationAdd support for entry variants branchMay 15, 2026

CopilotAI 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
FileDescription
Sources/EntryQuaryable.swiftAdds the new variants + branch header APIs on EntryQueryable.
Sources/Entry.swiftRemoves now-redundant variants(...) methods from Entry (covered via EntryQueryable extension).
Tests/QueryTest.swiftAdds unit tests for Query.variants(...) header behavior and updates allTests.
Tests/EntryTest.swiftAdds unit tests for Entry.variants(..., branch:) header behavior.
Tests/EntryVariantsAPITest.swiftAdds integration-style tests for variants + branch, with DVR/live modes.
Tests/DVRRecordings/EntryVariants.jsonAdds a DVR cassette for variants API calls.
ContentstackSwift.xcodeproj/project.pbxprojRegisters 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 threadTests/EntryVariantsAPITest.swift
Comment threadTests/EntryVariantsAPITest.swift
Comment threadTests/EntryVariantsAPITest.swift
@OMpawar-21
OMpawar-21 marked this pull request as ready for review July 24, 2026 12:30
@OMpawar-21
OMpawar-21 requested a review from a team as a code ownerJuly 24, 2026 12:30
@OMpawar-21
OMpawar-21 merged commit 94f81fb into developmentJul 24, 2026
4 checks passed
Sign up for freeto 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

@reeshika-h@sunil-lakshman@OMpawar-21