[BUG] [typescript-axios] Query parameters do not support `explode: true, style: form`
Created by: dantman
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
Have you tested with the latest master to confirm the issue still exists? -
Have you searched for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
OpenAPI supports parameters defined with the following.
name: color
in: query
style: form
explode: true
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#style-values
Parameters defined like this and given an array output query strings like color=blue&color=black&color=brown
.
However currently a typescript-axios client made by openapi-generator would instead output color=blue%2Cblack%2Cbrown
.
openapi-generator version
$ openapi-generator version
5.0.0-beta2
OpenAPI declaration file content or url
parameters:
- name: color
in: query
style: form
explode: true
schema:
type: array
item:
type: array
- in: query
name: Balance.Currency
style: form
explode: true
schema:
type: string
Generation Details
openapi-generator generate -i openapi.yaml -g typescript-axios -c config.yaml
Suggest a fix
I think that apiInner.mustache needs to be updated to include handling for this type of collection format.