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

Fix inconsistencies in response binding #1968

Merged
merged 6 commits into from
Apr 25, 2024
Merged

Conversation

TharmiganK
Copy link
Contributor

@TharmiganK TharmiganK commented Apr 25, 2024

Purpose

$Subject

Fixes: ballerina-platform/ballerina-library#6414
Fixes: ballerina-platform/ballerina-library#6416

Examples

public function main() returns error? {
    http:Client albumHttpClient = check new ("http://localhost:9090/api");
    
    // All of the following are supported
    http:Response|anydata targetType = check albumHttpClient->/albums/[2];
    http:Response|anydata|http:ClientError unionResult = albumHttpClient->/albums/[2];
    http:Response response = check albumHttpClient->/albums/[2];
    anydata data = check albumHttpClient->/albums/[2];
}

Checklist

  • Linked to an issue
  • Updated the changelog
  • Added tests
  • Updated the spec
  • Checked native-image compatibility
  • Checked the impact on OpenAPI generation

Copy link

sonarcloud bot commented Apr 25, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Apr 25, 2024

Codecov Report

Attention: Patch coverage is 83.67347% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 80.89%. Comparing base (8da69b6) to head (cc680b7).

Files Patch % Lines
...vice/signature/builder/AbstractPayloadBuilder.java 75.75% 2 Missing and 6 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1968      +/-   ##
============================================
+ Coverage     80.55%   80.89%   +0.33%     
- Complexity        0      562     +562     
============================================
  Files           353      389      +36     
  Lines         19840    21614    +1774     
  Branches       4623     4978     +355     
============================================
+ Hits          15982    17484    +1502     
- Misses         2990     3116     +126     
- Partials        868     1014     +146     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TharmiganK TharmiganK merged commit ea075fc into master Apr 25, 2024
8 checks passed
@TharmiganK TharmiganK deleted the fix-client-return branch April 25, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants