OpenAPITools / OpenAPITools/openapi-generator
[REQ] Regarding query parameters in array format.
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.
When setting query parameters for arrays
The request does not follow the expected request format on the server side.
Describe the solution you'd like
If the query parameter is an array
I want to be able to send a request with ?arr="1"&arr="2" in the format ?arr[]="1"&arr[]="2".
If the query parameter is an array, I would like to have the option to add [] to the key, like the default setting in axios.
Describe alternatives you've considered
Create a Class that extends URLSearchParams and insert [] in key for arrays when appending
--
Thank you for your consideration.
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 generated client query-parameter serialization entry point and the tests covering array parameters. Compare the current repeated-key format with the requested []-suffixed format and determine how an opt-in setting should be represented. Done means array query parameters can use the requested format without breaking the existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100