mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-04-27 02:44:19 +00:00
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