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
  • #11984
Closed
Open
Issue created Mar 28, 2022 by Administrator@rootContributor

[BUG][cpp-qt-client] compile error code for primitive types in body of put requests

Created by: rejuce

Bug Report Checklist

  • [ x] Have you provided a full/minimal spec to reproduce the issue?

  • [x ] Have you validated the input using an OpenAPI validator (example)?

  • [x ] Have you tested with the latest master to confirm the issue still exists?

  • [ x] Have you searched for related issues/PRs?

Description

PUT requests that have a primitive type, like int or double or bool in the spec, cause compile erros OAIDefaultApi::putAvgF32BankNr(const qint32 &bank_nr, const ::OpenAPI::OptionalParam<double> &body) is generated with body type "double" later called with QByteArray output = body.value().asJson().toUtf8(); which failes, as double is not class

openapi-generator version

5.4.0

OpenAPI declaration file content or url

see attached

Generation Details

default configuration

Steps to reproduce

generate qt client api with put request with primitive type request body

VHCx64CtrREST.json.txt

proposed solution

change the output array initialistion for primitive types to QByteArray output = QByteArray::number(body.value());

Assignee
Assign to
Time tracking