-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CAT: set additionalProperties
recursively for objects
#34448
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
airbyte-integrations/bases/connector-acceptance-test/unit_tests/test_asserts.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion. Please update the CHANGELOG.md file
@@ -67,7 +90,7 @@ def verify_records_schema( | |||
for stream in catalog.streams: | |||
schema_to_validate_against = stream.stream.json_schema | |||
if fail_on_extra_columns: | |||
schema_to_validate_against = _enforce_no_additional_top_level_properties(schema_to_validate_against) | |||
schema_to_validate_against = _enforce_false_additional_properties(schema_to_validate_against) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would find it more elegant to implement a custom Validator class which would enforce additional properties to false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, moved schema transformation inside validator class
What
Resolve #32191
How
Set
additionalProperties
recursively for objects inside jsonschema.Skip objects if no properties are mentioned.
Recommended reading order
airbyte-integrations/bases/connector-acceptance-test/connector_acceptance_test/utils/asserts.py
airbyte-integrations/bases/connector-acceptance-test/unit_tests/test_asserts.py
🚨 User Impact 🚨
no breaking changes
Pre-merge Actions
Updating a connector
Community member or Airbyter
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.