OpenAPITools / OpenAPITools/openapi-generator
[REQ] Typescript-axios : Serialize array/multivalue parameters as repeat params, not CSV
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
I have a defined OpenApi spec with a PUT method that takes an array of Strings as one of its request body parameters. The server that is accepting the request expects the parameters to be passed like:
param=Value1¶m=Value2¶m=Value3
The typescript-axios generator, however, serializes the request body parameters for an Array to a CSV format. As a result, the server receives a value like:
param=Value1%2CValue2%2CValue3
As a result, the parameters are not being deserialized and read properly on the server side
Describe the solution you'd like
A configuration parameter that would allow the Array to be serializes as a multi-valued parameter for both query parameters or form body parameters
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the typescript-axios generator's serialization logic for query parameters and form body parameters. Reproduce the issue with an OpenAPI operation containing an array of strings, then determine how configuration should produce repeated param=Value entries instead of CSV output and verify both parameter locations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100