Uh oh!
There was an error while loading. Please reload this page.
feat: entry variants branch support - #240
Conversation
reeshika-h
commented
May 12, 2026
- implementation
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
sunil-lakshman
left a comment
There was a problem hiding this comment.
Add version bump and changelog
There was a problem hiding this comment.
Pull request overview
This PR adds Content Management API “entry variants” support to the Java SDK, including stack-branch header propagation/overrides and publish/unpublish flows that require an api_version header, plus request-shape unit tests and fixtures.
Changes:
- Added entry-variant endpoints to
EntryServiceand corresponding public APIs onEntry(fetch/create/update/delete + publish/unpublish variants + branch handling helpers). - Introduced new unit tests and JSON fixtures to validate request paths, query params, and headers (including
branchandapi_version). - Extended shared constants/error messages to support variant-specific headers and validation.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/contentstack/cms/stack/EntryService.java | Adds Retrofit endpoints for entry-variant CRUD and adds query support to publish/unpublish. |
| src/main/java/com/contentstack/cms/stack/Entry.java | Adds branch/variant UID helpers and entry-variant operations, plus variant publish/unpublish helpers. |
| src/main/java/com/contentstack/cms/core/Util.java | Adds header constants for variant personalization and entry-variant publish API versioning. |
| src/main/java/com/contentstack/cms/core/ErrorMessages.java | Adds a validation message for missing Variant UID. |
| src/main/java/com/contentstack/cms/Contentstack.java | Updates stack(branch) Javadoc to clarify branch header behavior and overriding. |
| src/test/java/com/contentstack/cms/stack/EntryVariantUnitTest.java | New request-shape unit tests covering entry-variant endpoints and branch precedence. |
| src/test/java/com/contentstack/cms/stack/EntryVariantAPITest.java | New request-shape API test suite for entry-variant operations using fixtures and branch defaults. |
| src/test/java/com/contentstack/cms/stack/APISanityTestSuite.java | Registers the new entry-variant API tests in the sanity suite. |
| src/test/java/com/contentstack/cms/UnitTestSuite.java | Registers the new entry-variant unit tests in the unit suite. |
| src/test/java/com/contentstack/cms/TestClient.java | Adds env-configurable defaults for entry-variant test content type/branch/locale. |
| src/test/resources/entry_variant/create_entry_variant.json | Adds fixture payload for create variant requests. |
| src/test/resources/entry_variant/update_entry_variant.json | Adds fixture payload for update variant requests. |
| src/test/resources/entry_variant/publish_entry_variant.json | Adds fixture payload for publishing variants (requires api_version header). |
| src/test/resources/entry_variant/unpublish_entry_variant.json | Adds fixture payload for unpublishing variants (requires api_version header). |
| pom.xml | Changes surefire skipTests configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Uh oh!
There was an error while loading. Please reload this page.
…-support feat: entry variants branch support
…-support feat: entry variants branch support