Skip to content

feat: Taxonomy list-all endpoint + Term/TermQuery hierarchy support - #197

Draft
OMpawar-21 wants to merge 4 commits into
v2-legacyfrom
feat/taxonomy-27-07-2026
Draft

feat: Taxonomy list-all endpoint + Term/TermQuery hierarchy support#197
OMpawar-21 wants to merge 4 commits into
v2-legacyfrom
feat/taxonomy-27-07-2026

Conversation

@OMpawar-21

@OMpawar-21 OMpawar-21 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds Taxonomies().Find<T>() for the previously-missing GET /taxonomies (list all published taxonomies) endpoint, bringing this branch to parity with the Taxonomy Publishing feature set added elsewhere
  • Adds Depth/IncludeBranch modifiers to Term and TermQuery, and Skip/Limit/IncludeCount pagination to TermQuery.
  • Consolidates the request-building, header-merging, and error-parsing logic that was duplicated across Taxonomy.Fetch<T>(), Term's methods, and TermQuery.Find<T>() into a single Internals/TaxonomyRequestHelper. This also fixes a bug where GetHeader's local-header merge existed but was never actually called from any live request path.
  • Fixes a real deserialization bug in Term.Locales<T>()/Ancestors<T>()/Descendants<T>(): they were reading the JSON envelope under $.locales/$.ancestors/$.descendants, but the live CDA actually wraps all three under $.terms. Confirmed directly against the API - this silently returned the wrong (whole-envelope) object for loosely-typed callers and threw for strictly-typed ones (e.g. JArray).

Test plan

  • Contentstack.Core.Unit.Tests (TaxonomyUnitTests): 73/73 passing - covers every new modifier (chaining, param-set) via reflection into UrlQueries, plus the moved GetHeader/GetContentstackError tests now targeting TaxonomyRequestHelper directly, plus the renamed Taxonomy_Find_* tests.
  • Contentstack.Core.Tests (TaxonomyLocalisationTest, live integration against the real test stack): 17/17 passing, including new tests for Depth/IncludeBranch on ancestor/descendant traversal (verified against a real accessoriescases/chargers term hierarchy) and the renamed Find<T>() list-all-taxonomies endpoint.
  • Contentstack.Core.Tests (TaxonomySupportTest, entry-filter regression check): 28/28 passing, but see the callout above - this does not prove the entry-filter feature is unaffected, only that its own assertions don't catch the change.
  • Manually diffed live CDA responses via curl for every envelope key ($.taxonomy, $.taxonomies, $.term, $.terms) to confirm correctness beyond what the existing loosely-typed tests would catch, and directly compared GET /taxonomies/entries vs GET /taxonomies responses to confirm the behavior-change callout above with real data.

🤖 Generated with Claude Code

…port

Brings v2-legacy's CDA Taxonomy/Term/TermQuery classes to parity with the
newer Taxonomy Publishing feature set: adds Taxonomies().List<T>() for
GET /taxonomies, Depth/IncludeBranch on Term and TermQuery, and
Skip/Limit/IncludeCount pagination on TermQuery. Consolidates the
previously-triplicated request-building/header-merge/error-parsing logic
across Taxonomy/Term/TermQuery into a single Internals/TaxonomyRequestHelper,
fixing a bug where GetHeader's local-header merge was never actually invoked.

Also fixes Term.Locales/Ancestors/Descendants, which were reading the wrong
JSON envelope key ($.locales/$.ancestors/$.descendants) instead of the CDA's
actual $.terms wrapper - confirmed against the live API, where it silently
returned the raw envelope instead of throwing for loosely-typed callers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@OMpawar-21
OMpawar-21 requested a review from a team as a code owner July 27, 2026 13:09
@github-actions

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

…g parity

Renames the previously-added Taxonomies().List<T>() (GET /taxonomies) to
Find<T>(), matching the naming convention used by the TypeScript and Python
Contentstack SDKs for "fetch all X" style calls.

Note: since Taxonomy : Query and Taxonomies() returns Taxonomy, this new
Find<T>() (marked `new`) hides the inherited Query.Find<T>() used by the
entry-filter feature (Taxonomies().Above/Below/Exists(...).Find<Entry>()).
Confirmed live: that call chain now hits GET /taxonomies instead of
GET /taxonomies/entries, silently ignoring any Above/Below/Exists filters.
TaxonomySupportTest.cs still passes because its assertions (try/catch-any-
exception-as-pass, bare NotNull on success) aren't strict enough to catch
the substitution - flagging this here since the test suite won't.

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

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

@github-actions

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

@github-actions

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 self-assigned this Jul 28, 2026
@OMpawar-21
OMpawar-21 marked this pull request as draft July 28, 2026 03:42
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