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}} {
|
export function {{classname}}FromJSON(json: any): {{classname}} {
|
||||||
{{#hasVars}}
|
{{#hasVars}}
|
||||||
return {
|
return {
|
||||||
|
{{#additionalPropertiesType}}
|
||||||
|
...json,
|
||||||
|
{{/additionalPropertiesType}}
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{#isPrimitiveType}}
|
{{#isPrimitiveType}}
|
||||||
{{#isDate}}
|
{{#isDate}}
|
||||||
@ -77,6 +80,9 @@ export function {{classname}}ToJSON(value?: {{classname}}): any {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
{{#additionalPropertiesType}}
|
||||||
|
...value,
|
||||||
|
{{/additionalPropertiesType}}
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{^isReadOnly}}
|
{{^isReadOnly}}
|
||||||
{{#isPrimitiveType}}
|
{{#isPrimitiveType}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user