forked from loafle/openapi-generator-original
Merge pull request #1942 from xhh/javascript-fixes
[JavaScript] Fix initialization issues on array and nested model fields
This commit is contained in:
@@ -95,9 +95,9 @@ var StatusEnum = function StatusEnum() {
|
||||
|
||||
self.name = data.name;
|
||||
|
||||
self.photoUrls = new Array();
|
||||
self.photoUrls = data.photoUrls;
|
||||
|
||||
self.tags = new Array();
|
||||
self.tags = data.tags;
|
||||
|
||||
self.status = data.status;
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ describe('PetApi', function() {
|
||||
|
||||
expect(fetched).to.be.ok();
|
||||
expect(fetched.id).to.be(pet.id);
|
||||
expect(fetched.getPhotoUrls()).to.eql(pet.getPhotoUrls());
|
||||
expect(fetched.getCategory()).to.be.ok();
|
||||
expect(fetched.getCategory().getName()).to.be(pet.getCategory().getName());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user