Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #2212
Closed
Open
Issue created Feb 22, 2019 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[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.,

Assignee
Assign to
Time tracking