forked from loafle/openapi-generator-original
add fromJSON method (#13573)
This commit is contained in:
@@ -145,6 +145,14 @@ class Color {
|
||||
return this.getActualInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of Color from a JSON string.
|
||||
* @param {string} json_string JSON string.
|
||||
* @return {module:model/Color} An instance of Color.
|
||||
*/
|
||||
static fromJSON = function(json_string){
|
||||
return Color.constructFromObject(JSON.parse(json_string));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -99,6 +99,14 @@ class Pig {
|
||||
return this.getActualInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of Pig from a JSON string.
|
||||
* @param {string} json_string JSON string.
|
||||
* @return {module:model/Pig} An instance of Pig.
|
||||
*/
|
||||
static fromJSON = function(json_string){
|
||||
return Pig.constructFromObject(JSON.parse(json_string));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user