Skip to content

typescript-inversify generator wrongly handles array type parameters #7635

@michalzubkowicz

Description

@michalzubkowicz
Description

api.service.mustache generates such code

if (param !== undefined) {
    param.forEach((element) => {
    queryParameters.push('param='+encodeURIComponent(String(param)));
})
}

Instead of

if ($param !== undefined) {
    $param.forEach((element) => {
    queryParameters.push('param='+encodeURIComponent(String(element)));
})
}

Wrong variable is used in loop.

Suggest a fix

I'll provide PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions