-
Notifications
You must be signed in to change notification settings - Fork 65
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
Handle un-defined nillable properties #4870
Handle un-defined nillable properties #4870
Comments
Given that this issue has been a major cause of runtime failures in our generated connectors, it would be beneficial to prioritize this improvement as soon as possible. I've identified the following potential solutions for the same: 1. Using the
|
Adding on @NipunaRanasinghe's comment: 1. Using the
2. Treat null field values as a special case in data-binding
I am ok with both options |
Meeting: 2024/03/19 Attendees: @shafreenAnfar, @hasithaa, @MaryamZi , @warunalakshitha , @NipunaRanasinghe, @prakanth97 , @HindujaB , @TharmiganK , @dilanSachi, @lnash94 Discuss points :
Solution discussed:
|
To recap our last meeting discussion, here's the breakdown of the cases we need to reconsider within the context of payload data binding:
@shafreenAnfar @hasithaa @lnash94 feel free to add any missing points. |
@NipunaRanasinghe I have sent the PR for the jsondata module to support this requirement. |
Regarding the HTTP level support, it requires a stable version of |
Description:
According to Open API Specification if a given property is required or/and nullable we need to specifically mention it as explained in [1], [2].
Therefore If a given property is not specifically mentioned as required that property is optional by default. Similarly if a given property is not specifically mentioned as ”nullable: true” that property is not accepting null values by default.
We have experienced several scenarios, where the response we are receiving has null values even though that property is not configured as nullable: true. In such cases http target type binding fails, returning a type conversion error.
As a solution to this we have already introduced as
--nullable
flag to make all the fields nillable when it is not defined in the OpenAPI file. However this approach is not user friendly.Please introduce a methodology to handle this scenario in more user friendly way. (Ex: internally binding
null
fields without returning any runtime error.)Discussed this issue under the the email subjected [Handling nullable and required fields in connectors generated from Open API too] in 2021
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
The text was updated successfully, but these errors were encountered: