[BUG][R] query parameters are not considered while making the request
Created by: Ramanth
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)
Description
The query parameters are not being considered in the api calls.
openapi-generator version
latest from r_refactor branch (4.0.0)
OpenAPI declaration file content or url
Command line used for generation
java -jar openapi-generator-cli.jar generate --input-spec http://localhost:8000/xxxxxxxxxxx/xxx/xx -g r
--output OutFolder --config config.json
Steps to reproduce
hit any endpoint from the R client with few query parameters. The query params are not being included in the request.
Related issues/PRs
Not yet
Suggest a fix
currently in the api_client.mustache file the lines for the httr request are as below
current code
httr::POST(url, queryParams, headers, body = body, httr::content_type("application/json"), ...)
so the above should be modified to include the name of the parameter "query" for queryParams as below
fix
httr::POST(url, query = queryParams, headers, body = body, httr::content_type("application/json"), ...)
This shoule be done for other http methods like GET, PUT, DELETE..etc.,