Skip to content

feat(sdk-ts): accept ODCS v3.x contracts and make ontology optional - #461

Merged
nightmoose merged 2 commits into
stagingfrom
feat/ts-sdk-odcs
Nov 26, 2026
Merged

nightmoose merged 2 commits into
stagingfrom
feat/ts-sdk-odcs

Conversation

@nightmoose

Copy link
Copy Markdown
Owner

Mirrors the Python SDK change (#458) in the TypeScript SDK, where Contract.fromYaml still required ontology.

  • ontology is optional in native contracts.
  • ODCS v3.x documents (no ontology, with apiVersion: v3.x, kind: DataContract or a schema list) are mapped from schema[0].properties[]: logicalType (or physicalType when absent), required, primaryKey (implies required), enum (plain or {value} items), logicalTypeOptions (pattern, lengths, minimum, maximum). A map description is read as text. Unknown ODCS fields are ignored.
  • Name order matches the gateway: dataProduct, schema[0].name, root name.
  • Clear errors: unsupported apiVersion, missing version, no schema, no properties.
  • Known differences: this SDK has no date or timestamp type, so ODCS date / timestamp read as strings; unique and quality rules are not checked locally.

Tests: tests/odcs.test.ts with the official full example and a minimal contract (111 SDK tests pass, typecheck clean).

Not published. No version bump here: CHANGELOG.md has an Unreleased entry and says 0.4.2 is needed before the next npm publish.

Mirrors the Python SDK and the gateway. Tests with the official full example and a minimal
contract. No version bump or publish; changelog notes the 0.4.2 bump needed.
@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
contractgate Ready Ready Preview Nov 26, 2026 4:13pm UTC

Request Review

@nightmoose
nightmoose merged commit eedcdc8 into staging Nov 26, 2026
25 checks passed

This branch was successfully deployed

1 active deployment
Preview — 41011411 Deployed Nov 26, 2026 by vercel[bot]
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