Add support for array in form data request body
See original GitHub issueDescribe the solution you’d like
Practically, form data allows duplicate keys, and servers may parse them as an array (See https://stackoverflow.com/a/28434829).
One of our API requires such a parameter, but the generated requester doesn’t support this usage.
From the above StackOverflow answer, different servers may behave differently, so maybe some extra investigations are required. For our backend written in PHP, the parameter name must end with []
.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
FormData append javascript array (JSON.stringify ... - Laracasts
I'm using Vue/ inertia, to submit a javascript array to be stored as JSON in my DB. Because I'm submitting files in the...
Read more >Sending an array as form-data - Help - Postman community
You can send an array in form-data by using the same name for multiple keys, and putting values in each one. Please see...
Read more >Using FormData Objects - Web APIs | MDN
The FormData object lets you compile a set of key/value pairs to send using XMLHttpRequest . It is primarily intended for use in...
Read more >Send Array as Part of x-www-form-urlencoded Using Postman
To use the x-www-form-urlencoded type in Postman, we need to select the radio button with the same name within the request's body tab....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@yume-chan I published a new version 0.12.4, that should now support basic array types. Issue https://github.com/ferdikoomen/openapi-typescript-codegen/issues/772 is still valid
Thanks! I have verified it works for me.