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

[JavaScript] Support optional parameters with object syntax #2229

Merged
merged 2 commits into from
Feb 25, 2016
Merged

[JavaScript] Support optional parameters with object syntax #2229

merged 2 commits into from
Feb 25, 2016

Conversation

xhh
Copy link
Contributor

@xhh xhh commented Feb 24, 2016

See #2027

Code sample of optional parameters:

// specify both "name" and "status"
petApi.updatePetWithForm(1, {name: 'new name', status: 'pending'}, function (err, data, resp) { });
// specify only "status"
petApi.updatePetWithForm(1, {status: 'sold'}, function (err, data, resp) { });

@wing328
Copy link
Contributor

wing328 commented Feb 24, 2016

@delenius please take a look when you've time to see if that's what you've in your mind.

@delenius
Copy link
Contributor

Looks good to me.
@xhh , would you mind also updating the javascript-promise version of the petstore example (and run the tests for that)? i.e. bin/javascript-promise-petstore.sh.

wing328 added a commit that referenced this pull request Feb 25, 2016
[JavaScript] Support optional parameters with object syntax
@wing328 wing328 merged commit b5ba521 into swagger-api:master Feb 25, 2016
@xhh xhh deleted the js-optional-params branch February 25, 2016 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants