-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fix][python client] Fixed reserved keys is not removed when JsonSchema being encoded #15947
Conversation
@boatrainlsz:Thanks for your contribution. For this PR, do we need to update docs? |
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.
The change looks good. Please remove the unintended changes to the config files.
Sorry for that, I will remove those unintended changes later |
@merlimat I've removed those changes, please kindly review it. |
/pulsarbot run-failure-checks |
Fixes #15844
Motivation
JsonSchema doesn't remove reserved keys(
_default
,_required
,_required_default
) when being encoded. Resulting in confusing encoding output.Modifications
Extract a common method to remove reserved keys when JsonSchema is being encoded, and this common method will be called when JsonSchema::encode method is called.
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Check the box below or label this PR directly.
Need to update docs?
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)