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 response type always nullable under generateNullableReferenceTypes #304

Merged
merged 3 commits into from
Jan 26, 2024

Conversation

christianhelle
Copy link
Owner

This pull request fixes the issue where nullable types were being returned from the Refit interface when the setting generateNullableReferenceTypes is enabled.

This also adds tests for generating code with non-nullable return types and includes an assert for nullable return type tests.

Additionally, it updates the code to generate non-nullable return types in the ApiResponse.

This resolves #302

@christianhelle christianhelle added enhancement New feature, bug fix, or request .NET Pull requests that contain changes to .NET code labels Jan 26, 2024
@christianhelle christianhelle self-assigned this Jan 26, 2024
@christianhelle christianhelle linked an issue Jan 26, 2024 that may be closed by this pull request
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

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

See analysis details on SonarCloud

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2e6a261) 97.30% compared to head (060d88d) 97.33%.
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #304      +/-   ##
==========================================
+ Coverage   97.30%   97.33%   +0.02%     
==========================================
  Files          63       63              
  Lines        2377     2398      +21     
==========================================
+ Hits         2313     2334      +21     
  Misses         40       40              
  Partials       24       24              
Flag Coverage Δ
unittests 97.33% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@christianhelle christianhelle merged commit f7a8622 into main Jan 26, 2024
739 checks passed
@christianhelle christianhelle deleted the fix-nullable-return-types branch January 26, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, bug fix, or request .NET Pull requests that contain changes to .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Response is always nullable under generateNullableReferenceTypes
1 participant