forked from loafle/openapi-generator-original
[typescript-fetch][Fix] oneOf
models are generated without ...ToJSONTyped
functions but models referencing still try to import (#20046)
* Fix #19858 * re-generate the samples
This commit is contained in:
parent
28e02fc1a2
commit
2c38d0de35
@ -41,7 +41,11 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole
|
||||
{{/discriminator}}
|
||||
}
|
||||
|
||||
export function {{classname}}ToJSON(value?: {{classname}} | null): any {
|
||||
export function {{classname}}ToJSON(json: any): any {
|
||||
return {{classname}}ToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function {{classname}}ToJSONTyped(value?: {{classname}} | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
@ -52,7 +52,11 @@ export function TestResponseFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
||||
return {} as any;
|
||||
}
|
||||
|
||||
export function TestResponseToJSON(value?: TestResponse | null): any {
|
||||
export function TestResponseToJSON(json: any): any {
|
||||
return TestResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function TestResponseToJSONTyped(value?: TestResponse | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user