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
  • #6726
Closed
Open
Issue created Jun 20, 2020 by Administrator@rootContributor

[C++] Error making the cpprestsdk generated files

Created by: mull

Description

After using the generator as described for cpp-restsdk and trying to make the project, I receive a bunch of errors. (I've been trying all day and only now realised that either I'm doing something really wrong, or the generated code is broken.)

I see the following errors:

[  1%] Building CXX object CMakeFiles/CppRestOpenAPIClient.dir/api/AccountsApi.cpp.o
In file included from /home/mull/code/peertuber/psdk/api/AccountsApi.cpp:13:
/home/mull/code/peertuber/psdk/api/AccountsApi.h:25:10: fatal error: OneOfnumberarray.h: No such file or directory
   25 | #include "OneOfnumberarray.h"
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/CppRestOpenAPIClient.dir/build.make:167: CMakeFiles/CppRestOpenAPIClient.dir/api/AccountsApi.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/CppRestOpenAPIClient.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
openapi-generator version

4.3.1

(libcpprest-dev version 2.10.15-1, installed from ubuntu)

OpenAPI declaration file content or url

https://raw.githubusercontent.com/Chocobozzz/PeerTube/develop/support/doc/api/openapi.yaml

Command line used for generation
npx @openapitools/openapi-generator-cli generate \
  -i https://raw.githubusercontent.com/Chocobozzz/PeerTube/develop/support/doc/api/openapi.yaml \
  -g cpp-restsdk \
  --additional-properties=apiPackage=psdk.api,modelPackage=psdk.model
Steps to reproduce
npx @openapitools/openapi-generator-cli generate \
  -i https://raw.githubusercontent.com/Chocobozzz/PeerTube/develop/support/doc/api/openapi.yaml \
  -g cpp-restsdk \
  --additional-properties=apiPackage=psdk.api,modelPackage=psdk.model
cd psdk
cmake -DCPPREST_ROOT=/usr -DCMAKE_CXX_FLAGS="-I/usr/local/opt/openssl/include" -DCMAKE_MODULE_LINKER_FLAGS="-L/usr/local/opt/openssl/lib"
make
Related issues/PRs
Suggest a fix/enhancement
Assignee
Assign to
Time tracking