forked from loafle/openapi-generator-original
Create method to json (#6111)
This commit is contained in:
@@ -12,6 +12,10 @@ class {{classname}} {
|
||||
static const {{classname}} {{{name}}} = const {{classname}}._internal({{{value}}});
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
|
||||
{{dataType}} toJson (){
|
||||
return this.value;
|
||||
}
|
||||
|
||||
static {{classname}} fromJson({{dataType}} value) {
|
||||
return new {{classname}}TypeTransformer().decode(value);
|
||||
|
||||
Reference in New Issue
Block a user