-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Split "encodeParams" into "encodePathParams" and "encodeQueryParams" #4595
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
✅ Deploy Preview for redux-starter-kit-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9d50bc7:
|
removing the option completely would be a breaking change, requiring a major release - would it be possible to continue supporting the previous option while adding both the new ones? |
@EskiMojo14 I just merged the other PR on Friday and put it out in |
I was testing |
Overview
This PR splits the
encodeParams
option introduced in #4568 intoencodePathParams
andencodeQueryParams
so users can customize the code generator output according to their specific needs and existing backend infrastructure.When
encodeQueryParams
is enabled, the query parameters are conditionally encoded to prevent sendingundefined
parameters to the endpoint. This is particularly useful when certain query parameters are optional and should not be included in the request if they are not defined.Example output with
encodeQueryParams