JS client: support optional parameters with object syntax

Closes #2027
This commit is contained in:
xhh
2016-02-24 20:55:46 +08:00
parent bd32a6a410
commit baf5d2895e
8 changed files with 162 additions and 140 deletions

View File

@@ -29,7 +29,7 @@ var createRandomPet = function() {
describe('PetApi', function() {
it('should create and get pet', function(done) {
var pet = createRandomPet();
api.addPet(pet, function(error) {
api.addPet({body: pet}, function(error) {
if (error) throw error;
api.getPetById(pet.id, function(error, fetched, response) {