rametta / rapini

:leafy_green: OpenAPI to React Query (or SWR) & Axios
Apache License 2.0
152 stars 18 forks source link

Refactor makeRequestsPropertyAssignment to use loop over HTTP methods #46

Closed moetazbrayek1 closed 10 months ago

moetazbrayek1 commented 11 months ago

Refactor: Simplify makeRequestsPropertyAssignment Function

This PR refactors the makeRequestsPropertyAssignment function to use a loop over HTTP methods, reducing repetitive if statements and improving code maintainability. The functionality remains unchanged, ensuring backward compatibility. Unit tests have been checked to confirm they pass with the refactor.

rametta commented 11 months ago

Hi @moetazbrayek1, thanks for the PR. it seems the build fails with typescript types errors. Please take a look: image

moetazbrayek1 commented 11 months ago

okay let me double check the tests

rametta commented 11 months ago

okay let me double check the tests

Just to clarify, it is not the tests failing, it is the build/compilation of typescript failing because of type mismatches

moetazbrayek1 commented 11 months ago

Fixed the typing issue. Could you check now?

moetazbrayek1 commented 10 months ago

@rametta you can check now