[typescript-fetch] support additional properties (#3325)

This commit is contained in:
hello-brsd 2019-07-15 07:59:01 +02:00 committed by Esteban Gehring
parent 3eac8391f5
commit 2fbf0f33b3

View File

@ -31,6 +31,9 @@ export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{
export function {{classname}}FromJSON(json: any): {{classname}} {
{{#hasVars}}
return {
{{#additionalPropertiesType}}
...json,
{{/additionalPropertiesType}}
{{#vars}}
{{#isPrimitiveType}}
{{#isDate}}
@ -77,6 +80,9 @@ export function {{classname}}ToJSON(value?: {{classname}}): any {
return undefined;
}
return {
{{#additionalPropertiesType}}
...value,
{{/additionalPropertiesType}}
{{#vars}}
{{^isReadOnly}}
{{#isPrimitiveType}}