swagger-api / swagger-api/swagger-codegen
[C++][Pistache-server] Compilation error from missing header "ByteArray.h"
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
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
- go to the folder where the code was generated
- copy json.hpp (from https://github.com/nlohmann/json) to model
- mkdir build && cd build
- cmake ..
- make
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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