Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}}e
* Only for internal use.
*/{{/emitJSDoc}}
static initialize(obj{{#vendorExtensions.x-all-required}}, {{name}}{{/vendorExtensions.x-all-required}}) { {{#vars}}{{#required}}
{{#defaultValue}}obj['{{baseName}}'] = {{name}} || {{{defaultValue}}};{{/defaultValue}}{{^defaultValue}}obj['{{baseName}}'] = {{name}};{{/defaultValue}}{{/required}}{{/vars}}
{{#defaultValue}}obj['{{baseName}}'] = {{name}} || {{{defaultValue}}};{{/defaultValue}}{{^defaultValue}}obj['{{baseName}}'] = {{name}};{{/defaultValue}}{{/required}}{{#defaultValue}}{{^required}}
obj['{{baseName}}'] = {{{defaultValue}}};{{/required}}{{/defaultValue}}{{/vars}}
}

{{#emitJSDoc}}/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Animal {
*/
static initialize(obj, className) {
obj['className'] = className;
obj['color'] = 'red';
}

/**
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/javascript-apollo/src/model/Foo.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Foo {
* Only for internal use.
*/
static initialize(obj) {
obj['bar'] = 'bar';
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Order {
* Only for internal use.
*/
static initialize(obj) {
obj['complete'] = false;
}

/**
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/javascript-es6/src/model/Animal.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Animal {
*/
static initialize(obj, className) {
obj['className'] = className;
obj['color'] = 'red';
}

/**
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/javascript-es6/src/model/Foo.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Foo {
* Only for internal use.
*/
static initialize(obj) {
obj['bar'] = 'bar';
}

/**
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/javascript-es6/src/model/Order.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Order {
* Only for internal use.
*/
static initialize(obj) {
obj['complete'] = false;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Animal {
*/
static initialize(obj, className) {
obj['className'] = className;
obj['color'] = 'red';
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Foo {
* Only for internal use.
*/
static initialize(obj) {
obj['bar'] = 'bar';
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Order {
* Only for internal use.
*/
static initialize(obj) {
obj['complete'] = false;
}

/**
Expand Down