-
-
Notifications
You must be signed in to change notification settings - Fork 416
feat(axios): use named parameters #887
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
Conversation
Someone is attempting to deploy a commit to a Personal Account owned by @anymaniax on Vercel. @anymaniax first needs to authorize it. |
it's doesn't seems to work properly when there is no path params |
@anymaniax this change seems to have some overlap with #396. Do you have a preference between the two implementations? |
Hello @Marcel-G and thanks a lot. Seems great! Would you be interested to add a global config for that and do it for all client instead? |
@Marcel-G do you think we can merge the other one directly? |
Actually this PR goes with a slightly different approach so the other PR is redundant if we go this way. |
@Marcel-G for me other one make more sense to have a more global way of doing it. What do you think? |
@Marcel-G can you also contact me on discord when you have the time? |
Closing this for a more general approach #914 |
Status
READY
Description
Often times routes have many path parameters. As the number grows, type-safety is less effective as arguments (commonly string or number types) can easily get used in the wrong order.
Using named parameters helps this, as you get the added safety of needing to specify the appropriate name for the parameter.
This PR adds a
useNamedParameters
option for the axios client which creates path parameters as a single object.Steps to Test or Reproduce
Outline the steps to test or reproduce the PR here.
Heres an example output: