Bug Report Checklist
Description
Issue #8695, providing Arrays instead of Sets, introduced an error. The parantheses are misplaced such that ".map(...)" is called on Set instead on Array.
Example output:
export function PlanUpdateToJSON(value?: PlanUpdate | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'embeddedNodes': value.embeddedNodes === undefined ? undefined : (Array.from((value.embeddedNodes as Set<any>).map(NodeToJSON)))
};
}
openapi-generator version
5.1.0
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
introduced by #8695
Suggest a fix
https://github.com/t-h-e/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache
line 112
'{{baseName}}': {{^required}}value.{{name}} === undefined ? undefined : {{/required}}({{#isNullable}}value.{{name}} === null ? null : {{/isNullable}}Array.from(value.{{name}} as Set<any>).map({{#items}}{{datatype}}{{/items}}ToJSON)),
Bug Report Checklist
Description
Issue #8695, providing Arrays instead of Sets, introduced an error. The parantheses are misplaced such that ".map(...)" is called on Set instead on Array.
Example output:
openapi-generator version
5.1.0
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
introduced by #8695
Suggest a fix
https://github.com/t-h-e/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache
line 112