mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-04-19 20:19:08 +00:00
Compare commits
2 Commits
python-ser
...
PhilippGue
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b6873b57a | ||
|
|
a4ba1c590b |
@@ -47,7 +47,7 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole
|
||||
return json;
|
||||
}
|
||||
{{/-first}}
|
||||
if (instanceOf{{{.}}}(json)) {
|
||||
if (instanceOf{{{.}}}({{{.}}}FromJSONTyped(json, true))) {
|
||||
return {{{.}}}FromJSONTyped(json, true);
|
||||
}
|
||||
{{/oneOfModels}}
|
||||
@@ -56,7 +56,7 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole
|
||||
if (Array.isArray(json)) {
|
||||
if (json.every(item => typeof item === 'object')) {
|
||||
{{/-first}}
|
||||
if (json.every(item => instanceOf{{{.}}}(item))) {
|
||||
if (json.every(item => instanceOf{{{.}}}({{{.}}}FromJSONTyped(item, true)))) {
|
||||
return json.map(value => {{{.}}}FromJSONTyped(value, true));
|
||||
}
|
||||
{{#-last}}
|
||||
|
||||
Reference in New Issue
Block a user