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

Use custom TargetType as the client return type #21

Merged
merged 4 commits into from
Aug 23, 2024
Merged

Conversation

TharmiganK
Copy link
Contributor

@TharmiganK TharmiganK commented Aug 22, 2024

Purpose

Defined a target type for the client return types which is http:Response|anydata, this will make sure the SAP client is not breaking with any change done to the http:TargetType, and limits the return type to http:Response and anydata.

With update 10, the http:TargetType has been change to http:Response|anydata|stream<http:SseEvent, error?>. This change is done to support Server-Sent Events with the HTTP client. Currently the Server-Sent Events are not fully supported(there is initial support to map single text/event-stream media type to the stream) in the OpenAPI client generation. So, with this change, the SAP connectors will not support Server-Sent Event binding. If this support is required, we have to change this target type to http:Response|anydata|stream<http:SseEvent, error?>.

Fixes: ballerina-platform/ballerina-library#6905

Examples

N/A

Checklist

  • Linked to an issue
  • Updated the specification
  • Updated the changelog
  • Added tests
  • Checked native-image compatibility

@TharmiganK TharmiganK requested a review from niveathika as a code owner August 22, 2024 04:53
@TharmiganK TharmiganK marked this pull request as draft August 22, 2024 04:59
@TharmiganK TharmiganK changed the title Use http:TargetType for client return type Use custom TargetType as the client return type Aug 22, 2024
@TharmiganK TharmiganK marked this pull request as ready for review August 22, 2024 05:32
Copy link

codecov bot commented Aug 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.80%. Comparing base (833f4a5) to head (06b49f5).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #21   +/-   ##
=======================================
  Coverage   91.80%   91.80%           
=======================================
  Files           2        2           
  Lines         122      122           
  Branches       58       58           
=======================================
  Hits          112      112           
  Misses         10       10           

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

@niveathika niveathika merged commit f11be90 into main Aug 23, 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.

Fix SAP client compilation failure with Update 10
2 participants