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

Refactor API Request Parameters to Use Map<String, Object> for Improved Usability #1915

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

KyrillosNageh
Copy link
Contributor

📌 Summary

This PR refactors the API Request Builder to use Map<String, Object> for improved usability and readability.

🔧 Changes Implemented

  • Added overloaded setParameters(Map<String, Object>)
  • Deprecated old List<List<Object>> method for backward compatibility
  • Updated tests and documentation

✅ Linked Issue

Closes #1912

🔍 Testing

  • Verified functionality using unit tests.
  • Ensured backward compatibility with existing implementations.

📢 Notes

  • This improves readability and maintainability while allowing a smooth transition.

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 78.94737% with 4 lines in your changes missing coverage. Please review.

Project coverage is 50.65%. Comparing base (f9e245d) to head (897d10f).

Files with missing lines Patch % Lines
src/main/java/com/shaft/api/RequestBuilder.java 78.94% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1915      +/-   ##
============================================
- Coverage     52.19%   50.65%   -1.54%     
+ Complexity     1393     1343      -50     
============================================
  Files           115      115              
  Lines         10574    10591      +17     
  Branches       1048     1053       +5     
============================================
- Hits           5519     5365     -154     
- Misses         4404     4574     +170     
- Partials        651      652       +1     

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

Copy link
Contributor

@MahmoudElSharkawy MahmoudElSharkawy left a comment

Choose a reason for hiding this comment

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

Great PR, We just need to add a test for the FORM parameters.

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.

[Feature Request]: Refactor API Request Parameters to Use Map<String, Object> for Improved Usability
2 participants