Skip to content

[BUG][CPP-RESTSDK] Linking errors due to missing definition of declared methods in ModelBase.h #19566

@SaverioCode

Description

@SaverioCode

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

I got a Linking error
I imported in my project the generated files except for the api folder. Then I compile the project and I got a Linking problem related to all the classes that inherit from ModelBase.h, and all for the same methods

openapi-generator version
  • v7.8.0 released
  • v7.7.0 released

But I suppose the bug has been introduced in v7.6.0 released fixing the Set.h issue

OpenAPI declaration file content or url
Generation Details

I downloaded the 2 different version as a .jar from https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/
Then I generated the code running the following command from terminal
java -jar openapi-generator-cli.jar generate -i input.json -g cpp-restsdk
No custom conf or other things. Just like that

Steps to reproduce

1- Download the tool from the link above
2- Generate the code as previously described
3- Copy all the files (except for the api folder) inside the /include folder to your project /include folder
4- Copy all the files (except for the api folder) inside the /src folder to your project /src folder
5- Compile

N.B. Be sure that all the paths are include in your project settings

Related issues/PRs

I didn't found any similar issue but looks like it's related to the Set.h issue #16611

Suggest a fix

I suppose I can fix the bug. It should come from openapi-generator/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-header.mustache

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions