fabien0102 / openapi-codegen

A tool for generating code base on an OpenAPI schema.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle multiple-valued query parameters in queryParams

ceefour opened this issue · comments

Currently queryParams assumes that queryParams is a Record, meaning it's not possible to have, e.g.

https://example.com/?branch=valueA&branch=valueB

Note: URLSearchParams already supports multiple valued query parameters (appending parameters with the same name).

This should be fixed to allow multiple values.

@ceefour please take a look, #218
You can copy this to your *Fetcher.ts file

As mentionned in your pull-request, {namespace}Fetcher.ts is a template copied once, so you can tweak it as much as you want to fit your usecase 😉