forked from loafle/openapi-generator-original
[typescript-fetch] support additional properties (#3325)
This commit is contained in:
parent
3eac8391f5
commit
2fbf0f33b3
@ -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}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user