Skip to content

feat: taxonomy publish/unpublish/unlocalize + terms unlocalize - #213

Closed
OMpawar-21 wants to merge 2 commits into
developmentfrom
feat/taxonomy-publish-unpublish-localize
Closed

feat: taxonomy publish/unpublish/unlocalize + terms unlocalize#213
OMpawar-21 wants to merge 2 commits into
developmentfrom
feat/taxonomy-publish-unpublish-localize

Conversation

@OMpawar-21

Copy link
Copy Markdown
Contributor

Summary

  • Adds Publish(model) / PublishAsync to TaxonomyPOST /taxonomies/publish (collection-level, ThrowIfUidNotEmpty)
  • Adds Unpublish(model) / UnpublishAsync to TaxonomyPOST /taxonomies/unpublish (collection-level, ThrowIfUidNotEmpty)
  • Adds Unlocalize(locale) / UnlocalizeAsync to TaxonomyDELETE /taxonomies/{uid}?locale= (instance-level, ThrowIfUidEmpty)
  • Adds Unlocalize(locale) / UnlocalizeAsync to TermDELETE .../terms/{uid}?locale= (instance-level, ThrowIfUidEmpty)
  • New TaxonomyPublishModel (locales, environments, items, scheduled_at)
  • New TaxonomyPublishService<T> — root-level body serializer (publish/unpublish body is not field-wrapped unlike CreateUpdateService)

Reference: Java SDK feat/DX-9676-taxonomy-publish
TRD: https://contentstack.atlassian.net/wiki/spaces/CD/pages/3573580300

Test plan

  • dotnet test --filter "TaxonomyTest|TermTest" — 44/44 passed
  • Guard: Publish/Unpublish throw InvalidOperationException when UID is set
  • Guard: Taxonomy.Unlocalize / Term.Unlocalize throw ArgumentException when UID is empty
  • Happy-path: Publish, Unpublish, Unlocalize (sync + async) return ContentstackResponse

🤖 Generated with Claude Code

Closes parity gap with JS SDK and Java (feat/DX-9676-taxonomy-publish).

Taxonomy (Taxonomy.cs):
- Publish(model) + PublishAsync → POST /taxonomies/publish (ThrowIfUidNotEmpty)
- Unpublish(model) + UnpublishAsync → POST /taxonomies/unpublish (ThrowIfUidNotEmpty)
- Unlocalize(locale) + UnlocalizeAsync → DELETE /taxonomies/{uid}?locale= (ThrowIfUidEmpty)

Term (Term.cs):
- Unlocalize(locale) + UnlocalizeAsync → DELETE .../terms/{uid}?locale= (ThrowIfUidEmpty)

New: TaxonomyPublishModel.cs, TaxonomyPublishService.cs (root-level body serializer).
44/44 unit tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@OMpawar-21
OMpawar-21 requested a review from a team as a code owner August 3, 2026 18:08
@snyk-io

snyk-io Bot commented Aug 3, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

… and terms unlocalize (Test280-289)

Test280-283: Publish/Unpublish (sync + async) — looks up environment at runtime; marks Inconclusive
            if taxonomy_publish feature flag is not enabled on the test stack.
Test284-285: Taxonomy.Unlocalize/UnlocalizeAsync — localizes first, then removes the locale.
Test286-287: Term.Unlocalize/UnlocalizeAsync — same pattern on root term.
Test288:     Guard — Publish throws InvalidOperationException when UID is set.
Test289:     Guard — Unlocalize throws ArgumentException when no UID is set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

@OMpawar-21
OMpawar-21 marked this pull request as draft August 3, 2026 19:00
@OMpawar-21

Copy link
Copy Markdown
Contributor Author

Closing for now — demo preparation in progress. Will reopen when ready to build.

@OMpawar-21 OMpawar-21 closed this Aug 4, 2026
@OMpawar-21
OMpawar-21 deleted the feat/taxonomy-publish-unpublish-localize branch August 4, 2026 02:07
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.

1 participant