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

WAG 2.0 #309

Open
aastein opened this issue Dec 4, 2020 · 0 comments
Open

WAG 2.0 #309

aastein opened this issue Dec 4, 2020 · 0 comments

Comments

@aastein
Copy link
Contributor

aastein commented Dec 4, 2020

Background:
WAG operations that accept one argument take that argument as their first parameter.

myClient.myOperation(“foo”);

WAG operations that accept more than one argument take a params object as their first parameter.

myClient.myOperation({ foo: “one”, bar: 2 });

Adding a third optional argument, does not cause a breaking client API change, the call-site still calls the function with a params object.

myClient.myOperation({ foo: “one”, bar: 2, baz: null });

Proposal:
Adding a new optional argument to a WAG operation should not cause a breaking change in the generated API client.

Alternatively, all optional arguments always go inside of a separate options argument at the call site.

The key motivation is to eliminate the surprising nature of adding a new argument, and having to know which number argument it is. Adding a new optional argument should always behave in the same manner.

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

No branches or pull requests

1 participant