-
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
CDK: don't filter failed interpolated vars for request_options_provider.request_body_json
#19297
CDK: don't filter failed interpolated vars for request_options_provider.request_body_json
#19297
Conversation
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
request_options_provider.request_body_json
request_options_provider.request_body_json
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
("test_integer_falsy_value", {"integer_falsy": "{{ 0 }}"}, {"integer_falsy": 0}), | ||
("test_number_falsy_value", {"number_falsy": "{{ 0.0 }}"}, {"number_falsy": 0.0}), | ||
("test_string_falsy_value", {"string_falsy": "{{ '' }}"}, {"string_falsy": None}), | ||
("test_none_value", {"none_value": "{{ None }}"}, {"none_value": None}), |
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.
when would we want to return None
in the request body?
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.
In theory I can imagine something like this:
curl -d '{"key1":null}' -X POST http://api.com/api
But to be honest we did not encounter in this for now. For now we need only this:
curl -d '{"key1":false}' -X POST http://api.com/api
I have re-implemented doing less radical changes
What do you think now?
…ut_provider Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
…ut_provider Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
/publish-cdk dry-run=false
|
…der.request_body_json` (#19297) Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Signed-off-by: Sergey Chvalyuk grubberr@gmail.com
What
In current implementation of Interpolation this does not work:
key1
,key2
will be removed because of this:https://github.com/airbytehq/airbyte/blob/master/airbyte-cdk/python/airbyte_cdk/sources/declarative/requesters/request_options/interpolated_request_input_provider.py#L48
I propose do this "empty value" filtering only for:
request_options_provider.get_request_params
request_options_provider.get_request_headers
request_options_provider.get_request_body_data
but for
request_options_provider.request_body_json
skip this filtering