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

[REQ] Use NamedParameters in Javascript API calls #6410

Closed
RafaRochaS91 opened this issue May 23, 2020 · 3 comments
Closed

[REQ] Use NamedParameters in Javascript API calls #6410

RafaRochaS91 opened this issue May 23, 2020 · 3 comments

Comments

@RafaRochaS91
Copy link

RafaRochaS91 commented May 23, 2020

Is your feature request related to a problem? Please describe.

My organisation has been having broken builds because of the changes in the parameter order in the generated axios API call methods.

Describe the solution you'd like

The most straightforward solution, from the usage perspective, would be having these API calls having named parameters (object arguments) since the order would become irrelevant and wouldn't break the functionality. I.E.:

api.someServiceEndpoint.someMethod({ ...params }) {}

Describe alternatives you've considered

We can just manually change the order of the parameters in the generated method calls whenever our pipeline job of building/testing breaks.

Additional context

Could be interesting to add a flag on generation to have an opt-in way of choosing named parameters or keeping the existing behaviour.

@wing328
Copy link
Member

wing328 commented May 25, 2020

We just added an option for that. Can you test with the latest master using the option?

Ref: #6288

@RafaRochaS91
Copy link
Author

Thank you! Will test it :)

@wing328
Copy link
Member

wing328 commented May 27, 2020

No problem. Let us know if you need help. closing the issue for the time being.

@wing328 wing328 closed this as completed May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants