Skip to content
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

Add Relaxed Data Binding Support for Client Generation #1793

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

SachinAkash01
Copy link
Member

Purpose

$subject

Fixes: #7413
See also: #7366

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email [email protected] to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to [email protected] and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

@SachinAkash01 SachinAkash01 marked this pull request as ready for review November 27, 2024 04:49
@@ -301,6 +301,10 @@ public type ConnectionConfig record {|
http:ProxyConfig proxy?;
# Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
boolean validation = true;
# Enables or disables relaxed data binding on the client side. Disabled by default.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Enables or disables relaxed data binding on the client side. Disabled by default.
# Enables or disables relaxed data binding on the client side. Enabled by default.

Comment on lines +1343 to +1346
String apiComment = "Enables or disables relaxed data binding on the client side. " +
"Disabled by default.\nWhen enabled, the JSON data will be projected to the Ballerina record type" +
" and during the projection, \nnil values will be considered as optional fields and absent fields " +
"will be considered for nilable types";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
String apiComment = "Enables or disables relaxed data binding on the client side. " +
"Disabled by default.\nWhen enabled, the JSON data will be projected to the Ballerina record type" +
" and during the projection, \nnil values will be considered as optional fields and absent fields " +
"will be considered for nilable types";
String apiComment = "Enables relaxed data binding on the client side. When enabled, `nil` values are treated as optional, \nand absent fields are handled as `nilable` types. Enabled by default.";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Member

@lnash94 lnash94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to address review suggestions in separate PR

@lnash94 lnash94 merged commit 11a335b into ballerina-platform:master Nov 27, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Ballerina OpenAPI] Support Relaxed Data Binding for the Client Generation
3 participants