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
  • #747
Closed
Open
Issue created Aug 06, 2018 by Administrator@rootContributor

[C++][Restbed-server] Compilation error from missing header "ByteArray.h"

Created by: vbs96

Description

The Restbed server generated code includes a header file that does not exists (ByteArray.h):

From Frame.h:

#ifndef Frame_H_
#define Frame_H_

#include <string>
#include "ByteArray.h"
#include "Event.h"
#include <map>
#include <vector>
#include <memory>
openapi-generator version

3.2.1 (cloned the master branch)

OpenAPI declaration file content or url

https://raw.githubusercontent.com/deepviss/deepviss-server-example/master/src/main/resources/deep-viss.json

Command line used for generation

Inside cloned repository, after mvn clean package command: java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate / -i deep-viss.json / -g cpp-restbed-server / -o ../openapi-restbed-server

Steps to reproduce

I used the following cmake file:

cmake_minimum_required(VERSION 3.10)
project(restbed_ex)

set(CMAKE_CXX_STANDARD 11)

file(GLOB_RECURSE src_files mode/*.cpp api/*.cpp)

add_executable(restbed_ex main.cpp ${src_files})
target_include_directories(restbed_ex PRIVATE /restbed/include/)
target_include_directories(restbed_ex PRIVATE model/)
target_include_directories(restbed_ex PRIVATE api/)
target_link_libraries(restbed_ex restbed)

Note: Assuming restbed/include is the folder with restbed include files (https://github.com/Corvusoft/restbed) and that you copied the json.hpp file from https://github.com/nlohmann/json to model folder

The content of main.cpp file is redundant as the compilation won't pass the line where "ByteArray.h" is included (that is model/Frame.cpp)

Assignee
Assign to
Time tracking