Repository navigation
Promote staging to main: ODCS compatibility (optional ontology) - #459
Merged
Merged
Conversation
… API, Python SDK) Root cause: validate/synth/enforce/test/push/deploy and the API parsed contract YAML straight into the native Contract struct, where ontology was required and description had to be a string. ODCS documents never reach the existing ODCS importer outside POST /contracts/import. - ontology and ontology.entities now default to empty; description accepts a map - odcs::parse_contract_yaml / normalize_contract_yaml detect ODCS (no ontology plus apiVersion v3.x, kind DataContract, or a schema list) and map it through the existing importer; native YAML is untouched - used by the CLI, POST /contracts/synth, playground, contract create/version/draft/ deploy (stored as native YAML), impact and diff - importer: physicalType fallback, map type, primaryKey implies required and unique (single column), note for extra schema objects, numeric version, clear errors (Data Contract Specification, no schema, no properties, bad apiVersion) - Python SDK Contract.from_yaml reads ODCS and no longer requires ontology - fixtures: official full example and a minimal contract; docs/odcs/using-odcs-directly.md
fix: accept ODCS v3.x contracts without an ontology (validate, synth, API)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes the ODCS compatibility fix from staging to main (prod). Contains only PR #458 (merge ada09f0).
What a user gets:
contractgate validate,synth,test,enforce,push,deploy,POST /contracts/synth, the playground and contract create / version / deploy accept a valid ODCS v3.x contract with noontology.descriptionmay be text or the ODCS object form. The Python SDK reads ODCS too. Native contracts behave as before.Risk: low. No DB migration. Native YAML takes the same parse path as before (ontology and ontology.entities now default to empty). ODCS input is converted once, on the way in, with the existing importer.
Verified on staging (build ada09f0): CLI built from staging passes validate and synth on a minimal ODCS contract and on the official full example;
POST /contracts/synthand the public playground return rows and violations for both; contract create stores native YAML; a Data Contract Specification file gets a clear 422. CI green on #458 (902 Rust tests, Python SDK 209, clippy, fmt, CodeQL).Known gaps (documented in
docs/odcs/using-odcs-directly.md): onlyschema[0]is read, relationships and SQL quality checks are not mapped, TypeScript SDK still requiresontology.