mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 12:52:49 +00:00
[Javascript] Add initialization of default vars to constructor (#19692)
* Add initialization of default vars to constructor * Update samples
This commit is contained in:
@@ -36,6 +36,7 @@ class Animal {
|
||||
*/
|
||||
static initialize(obj, className) {
|
||||
obj['className'] = className;
|
||||
obj['color'] = 'red';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,6 +34,7 @@ class Foo {
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
obj['bar'] = 'bar';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,6 +34,7 @@ class Order {
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
obj['complete'] = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user