-
Notifications
You must be signed in to change notification settings - Fork 917
Add JSON Schema validation test; fix typo #2003
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
Conversation
🎉 All Contributor License Agreements have been signed. Ready to merge. |
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.
Pull Request Overview
This PR adds schema payload validation to JSON serialization tests and fixes a typo in the validate
flag check within the JSONSerializer initializer.
- Enabled explicit
validate: True
in serializer configs for both sync and async tests - Added
test_json_basic_failing_validation
in sync and async to confirm invalid payloads raiseSerializationError
- Corrected the boolean check to validate
self._validate
instead ofself._normalize_schemas
in both sync and async JSONSerializer implementations
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
tests/schema_registry/_sync/test_json_serdes.py | Added validate flag and new failing validation test |
tests/schema_registry/_async/test_json_serdes.py | Added validate flag, new failing validation test, and minor client instantiation change needed |
src/confluent_kafka/schema_registry/_sync/json_schema.py | Fixed typo: now checks self._validate is boolean |
src/confluent_kafka/schema_registry/_async/json_schema.py | Fixed typo: now checks self._validate is boolean |
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.
thanks
What
Add JSON Schema validation test; fix typo
Checklist
References
JIRA:
Test & Review
Open questions / Follow-ups