swagger-api / swagger-api/swagger-codegen

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

Open
#8,541 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

When I tried to compile the generated Pistache server it gives me the following error:

/swagger-pistache/model/Frame.h:25:23: fatal error: ByteArray.h: No such file or directory

Frame.h:

#ifndef Frame_H_
#define Frame_H_


#include "ModelBase.h"

#include <string>
#include "ByteArray.h" //this header does not exists
#include "Event.h"
#include <map>
#include <vector>
Swagger-codegen version

2.4

Swagger 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

java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate /
-i deep-viss.json /
-l pistache-server /
-o ../swagger-pistache

Steps to reproduce

Note: Assuming Pistache server is installed

  1. go to the folder where the code was generated
  2. copy json.hpp (from https://github.com/nlohmann/json) to model
  3. mkdir build && cd build
  4. cmake ..
  5. make

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure using the listed swagger-codegen command and the generated Pistache server build steps, then inspect model/Frame.h and the corresponding pistache-server generator template. Trace why the generated model includes ByteArray.h, and verify that regenerated output builds successfully with CMake and make.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.