-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG][typescript-node] invalid handling of array param in forms, encoding
options ignored
#3781
Comments
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
Note: I've also tried using other allowed values for |
@quezak would you like to implement a fix? |
@macjohnny I'll take a look tomorrow if it's easy enough. For now I've worked around this by directly passing a comma-separated string as the param, but that's not typesafe. Do you maybe know the expected rough timeline for the typescript generators rewrite (#802)? If the work is already advanced, it might be not feasible to fix issues in the current TS generators. |
I don't know when the rewrite will be finished, so for the time being, the current typescript generators are maintained. |
Any news on this issue? I also have the problem with query params. The style and explode gets ignored. It only renders the [] style query params like
|
Bug Report Checklist
Description
When using an array POST form parameter, the generated client serializes it improperly, and ignores the
encoding
settings in the request body specification.scope
, an array of stringsapi.test(['scope1', 'scope2'])
encoding.scope.explode: true
:scope=scope1&scope=scope2
encoding.scope.explode: false
:scope=scope1,scope2
scope%5B0%5D=scope1&scope%5B1%5D=scope2
, which is the urlencoded form ofscope[0]=scope1&scope[1]=scope2
...openapi-generator version
OpenAPI declaration file content or url
Command line used for generation
java -jar $GENERATOR_JAR generate -i test.yml -g typescript-node -p supportsES6=true -o .
Steps to reproduce
The text was updated successfully, but these errors were encountered: