Skip to content

Conversation

@jochenchrist
Copy link
Contributor

  • Tests pass
  • ruff format
  • README.md updated (if relevant)
  •  CHANGELOG.md entry added

@jochenchrist jochenchrist requested a review from Copilot December 1, 2025 19:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances JSON Schema export functionality by adding support for ODCS logical type validation constraints. The changes enable proper export of validation rules like minLength, maxLength, pattern, format, minimum, maximum, and various array/object constraints from ODCS data contracts to JSON Schema format.

Key Changes:

  • Added import support for logicalTypeOptions in the ODCS v3 importer
  • Enhanced JSON Schema exporter to handle validation constraints from field config
  • Fixed DuckDB type conversion for number/decimal/numeric types

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_export_jsonschema.py Added test case to verify ODCS to JSON Schema export with logical type options
tests/fixtures/jsonschema/jsonschema.odcs.yaml Comprehensive test fixture covering all ODCS logical types and their validation options
tests/fixtures/jsonschema/jsonschema.json Expected JSON Schema output for the ODCS test fixture
datacontract/imports/odcs_v3_importer.py Extended importer to extract logicalTypeOptions into Field model properties and config
datacontract/export/jsonschema_converter.py Enhanced exporter to include validation constraints from field config in JSON Schema output
datacontract/export/duckdb_type_converter.py Changed type conversion for number/decimal/numeric from VARCHAR to DECIMAL
CHANGELOG.md Documented new features and fixes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants