-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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-angular] queryParamObjectFormat=json does not work for arrays #7620
Closed
4 of 6 tasks
Labels
Comments
Hi! I'd like to take care of this one. |
6 tasks
GrizliK1988
added a commit
to GrizliK1988/openapi-generator
that referenced
this issue
Oct 11, 2020
…when queryParamObjectFormat=json (fix OpenAPITools#7620)
jimschubert
added a commit
that referenced
this issue
Oct 17, 2020
* master: (66 commits) [Typescript][Angular] Fix generated README when using apiModulePrefix (#7725) remove outdated scala files (#7723) [FEAT][TYPESCRIPT-ANGULAR] Add configurationPrefix option to allow generating unique configuration token (#7731) [bug] Fix FILES sort and path provider issue (#7729) better csharp tests (#7727) [go] Improve examples generation (#7576) Fixes #7635: typescript-inversify generator wrongly handles array type parameters (#7636) [Java] Fix import mapping for arrays with reference items of type string (#7182) [Java][Native] Support oneOf/anyOf schemas (#7263) [BUG][Ada] Incorrect client Ada code generated (#7719) add cake, sbt integration (#7713) Use 3.0 spec in documentations, update docs (#7710) remove github.com/antihax/optional from go.sum (#7692) Update junit to newer version (4.13.1) (#7690) [Fix/Dart2] Resolve an exception with status 204 and no body. (#7647) [typescript-angular] pass array as a single JSON string to url query when queryParamObjectFormat=json (fix #7620) (#7649) Add back HttpSigningConfiguration.cs remove HTTPSigningConfiguration.cs add AnyType support to Swift generators (#7644) fix warning, remove trailing spaces (#7659) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report Checklist
Description
When using
queryParamObjectFormat=json
with query param of type array I would expect the request url to look something likehttps://example.com/pizzas?sorting=[{"name": 1}, {"price": -1}]
Instead of
https://example.com/pizzas?sorting={"name": 1}&sorting={"price": -1}
orhttps://example.com/pizzas?sorting={"name": 1},{"price": -1}
openapi-generator version
v5.0.0-beta2
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
npx @openapitools/openapi-generator-cli version-manager set 5.0.0-beta2 npx @openapitools/openapi-generator-cli generate -i spec.yaml -g typescript-angular -o ./generated --additional-properties=queryParamObjectFormat=json
Related issues/PRs
Suggest a fix
I think
isQueryParamObjectFormatJson
should be checked hereopenapi-generator/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache
Lines 177 to 198 in d8ba49b
Maybe something like this could work:
The text was updated successfully, but these errors were encountered: