Add support for entry variants branch#134
Draft
reeshika-h wants to merge 3 commits into
Draft
Conversation
sunil-lakshman
approved these changes
May 18, 2026
There was a problem hiding this comment.
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 onEntryQueryableto set the appropriate request headers. - Updates unit tests for
EntryandQueryto validate variant/branch header formation. - Adds
EntryVariantsAPITestplus 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.
OMpawar-21
approved these changes
Jul 20, 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.
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.