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
  • #12641
Closed
Open
Issue created Jun 20, 2022 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG] [cpp-qt-client] No support for AnyType objects

Created by: danielrenninghoff

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

The cpp-qt-client generator produces invalid code (code that cannot be compiled) for AnyType objects.

...
#include "OAIAnyType.h"
...
QList<OAIAnyType> getArrayOfSomething() const;
...

The header OAIAnyType.h does not exist and is not generated and the type OAIAnyType is defined nowhere.

openapi-generator version

master - 6.0.0

OpenAPI declaration file content or url

Full scheme

arrayOfSomething:
          type: array
          items: {}
          nullable: true
Generation Details
Steps to reproduce
java -jar openapi-generator-cli.jar generate -i https://gist.githubusercontent.com/madrazzl3/da2502b6816aaa98713cba75e595f373/raw/d53da8c6098167768c3e5b1ad1381467397d6a51/example-scheme.yaml -g cpp-qt-client -o generated-client/
Related issues/PRs

Similar problem with other generators:

  • C++ UE4: #10266 (closed)
  • C#: #7458
  • TypeScript: #6332 (closed)
  • Swift5: #7617 (closed)
Suggest a fix

Add type mapping AnyType -> QJsonValue. QJsonValue can be used to manually get the correct type later.

Assignee
Assign to
Time tracking