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
  • #4342
Closed
Open
Issue created Oct 31, 2019 by Administrator@rootContributor0 of 2 checklist items completed0/2 checklist items

[BUG][C++][Qt5] Object received via HTTP request callback have false isSet values

Created by: javorszkymazsi

Bug Report Checklist

  • [ x] Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • [ x] What's the version of OpenAPI Generator used?
  • [x ] Have you search for related issues/PRs?
  • [ x] What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

I needed a tool for accessing a C# REST API via a C++ application, and I used the openapi-generator to generate Qt code through which I could make HTTP requests to the server and get a response.

If an HTTP Post request is sent to the server and information bundled in a custom object is received in the callback, that object has all its variables filled with valuable information, that's good. But all variables have a corresponding m_whatever_isSet bool variable next to them and if that object came from a callback, those bool variables are false. It is no problem if you only need the data but if that object is used again for another HTTP request, all the variables with a false m_whatever_isSet value aren't considered. Currently, I'm using a workaround which is painful cpu usage-wise and reset all the variables with the values in them.

openapi-generator version

4.1.3

OpenAPI declaration file content or url

I did not use such thing. The HTTP request was handled in the C# REST API server.

Command line used for generation

java -jar openapi-generator-cli-4.1.3.jar generate ^ -i http://localhost:5000/swagger/.../swagger.json ^ -g cpp-qt5-client ^ -o ./client ^ -DmodelTests=false ^ -DapiTests=false ^ -DpackageName="ApiClient" ^ -DoptionalProjectFile=true

Steps to reproduce
  1. Send HTTP request to the server which gives back a custom object
  2. Use that object as it is in an another HTTP request.
Related issues/PRs

No.

Suggest a fix

Custom objects coming in from an HTTP request's response should have m_whatever_isSet as true where the values are filled out.

Assignee
Assign to
Time tracking