Skip to content

feat(response): add support for empty payload for nullable types#100

Merged
sufyankhanrao merged 3 commits intomainfrom
99-handle-nullable-response-types
Jul 9, 2024
Merged

feat(response): add support for empty payload for nullable types#100
sufyankhanrao merged 3 commits intomainfrom
99-handle-nullable-response-types

Conversation

@sufyankhanrao
Copy link
Copy Markdown
Collaborator

@sufyankhanrao sufyankhanrao commented Jul 5, 2024

What

The PR addresses the following changes;

  • Added support for handling nullable response types in the ResponseHandler class
  • Fixed bug for empty strings in isNullOrWhitespace utility in CoreHelper class
  • Added unit tests for the changes

Why

  • To fix the bug for empty string in the isNullOrWhitespace utility method
  • To add support for nullable types in response handler to early return when the response is null

closes #99

Type of change

Select multiple if applicable.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause a breaking change)
  • Tests (adds or updates tests)
  • Documentation (adds or updates documentation)
  • Refactor (style improvements, performance improvements, code refactoring)
  • Revert (reverts a commit)
  • CI/Build (adds or updates a script, change in external dependencies)

Dependency Change

If a new dependency is being added, please ensure that it adheres to the following guideline https://github.com/apimatic/apimatic-codegen/wiki/Policy-of-adding-new-dependencies-in-the-core-libraries

Breaking change

If the PR is introducing a breaking change, please ensure that it adheres to the following guideline https://github.com/apimatic/apimatic-codegen/wiki/Guidelines-for-maintaining-core-libraries

Testing

List the steps that were taken to test the changes

Checklist

  • My code follows the coding conventions
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added new unit tests

The commit addresses the following changes;
- Added support for handling nullable response types in the ResponseHandler class
- Fixed bug for empty strings in `isNullOrWhitespace` utility in CoreHelper class
- Added unit tests for the changes

closes #99
@sufyankhanrao sufyankhanrao added the enhancement New feature or request label Jul 5, 2024
@sufyankhanrao sufyankhanrao self-assigned this Jul 5, 2024
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jul 5, 2024

@asadali214 asadali214 self-requested a review July 8, 2024 09:57
@sufyankhanrao sufyankhanrao merged commit f31ec3d into main Jul 9, 2024
@sufyankhanrao sufyankhanrao deleted the 99-handle-nullable-response-types branch July 9, 2024 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add complete support for returning nullable response types

2 participants