forked from loafle/openapi-generator-original
Modifying the es5 and es6 templates for javascript to handle default values (#6649)
for required fields better. This change ensures the required field isn't overridden with undefined when the object is constructed - especially through a chain of constructFromObject calls..
This commit is contained in:
@@ -35,7 +35,7 @@ class Category {
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj, name) {
|
||||
obj['name'] = name;
|
||||
obj['name'] = name || 'default-name';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user