feat: add localized taxonomy and term delivery (CDA) support#190
Conversation
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Extends the .NET SDK with published-taxonomy fetch and term delivery
endpoints to match the TypeScript feat/taxonomy-publishing parity (CD-11371).
New:
- Term.cs — Fetch(locale?), Locales<T>(), Ancestors<T>(), Descendants<T>()
- TermQuery.cs — SetLocale()/IncludeFallback() chainable builder + Find<T>()
Extended Taxonomy class:
- Taxonomy(stack, uid) constructor
- _Url switches to /taxonomies/{uid} when uid is set
- Fetch<T>(locale?) — own HTTP path, parses $.taxonomy
- Term(termUid) → Term, Terms() → TermQuery
Extended ContentstackClient:
- Taxonomies(uid) overload
Tests:
- TaxonomyUnitTests — 46 unit tests (all pass)
- TaxonomyLocalisationTest — integration tests per CDA call
- TestDataHelper — taxonomy-publish stack config properties
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6274caa to
1940b78
Compare
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
…ntegration tests - Add includeFallback param to Term.Fetch<T>; serialize as string "true" to match CDA case-sensitivity (bool true serializes as "True" which the API rejects) - Pass includeFallback: true in Fetch_SingleTerm test to be consistent with how GetFirstTermUidAsync lists terms (with IncludeFallback) - Rewrite Find_AllTaxonomies test to call Terms().Find<JObject>() without locale instead of the entries-by-taxonomy endpoint which requires tagged entries
🔒 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 |
fix: added branch set via the stack config
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
…convention - Replace Taxonomy.Fetch<T>(string locale) and Term.Fetch<T>(string locale, bool includeFallback) with chainable SetLocale()/IncludeFallback()/AddParam() before Fetch<T>() — matching the convention used by Asset, Entry, and AssetLibrary - Fix Branch ?? "main" fallback across Taxonomy, Term, TermQuery — was injecting branch=main into every CDA request when branching was not configured, causing 422 Branch not found errors - Wire GetContentstackError() into all catch blocks across Taxonomy, Term, TermQuery — replaces TaxonomyException.CreateForProcessingError() which never read the API response body, leaving ErrorCode/StatusCode/Errors unpopulated on 4xx responses - Rename _queryParams → UrlQueries in Term and TermQuery to match Taxonomy and Entry - Fix TermQuery.SetLocale(null) to no-op instead of throwing, consistent with Taxonomy/Term/Entry - Add AddParam() to TermQuery (was missing) - Add class-level XML doc and <example> blocks across Taxonomy, Term, TermQuery Adds 15 new unit tests (Taxonomy.SetLocale/IncludeFallback/AddParam, Term.SetLocale/ IncludeFallback/AddParam, TermQuery.AddParam) — 1016 total, all passing
🔒 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 |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
be9e17b
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Extends the .NET SDK with published-taxonomy fetch and term delivery endpoints to match the TypeScript feat/taxonomy-publishing parity.
New:
Extended Taxonomy class:
Extended ContentstackClient:
Tests: