-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C++][Pistache-server] model is not a namespace-name #637
Comments
@CyrilleBenard |
Unfortunately there is another condition in which this bug occurs. I just found it using a heavy YAML file. Below a minimalist YAML file to reproduce it. If one path uses a model content and a second path below the first one does NOT need a model, the generator still insert the line using namespace xx::yyy::model without any corresponding include file. See below the YAML file to reproduce this bug
|
XD [100%] Linking CXX executable check_api_server
[100%] Built target check_api_server Solved in #775. |
Confirmed. It fixes this issue 👍 |
Description
The generator seems to add systematically the instruction using namespace xxx::yyy::model ; without any needs and without, at least, one corresponding definition of the model namespace. The C++ compilation failed.
Compilation error looks like
NOTE : The hierarchical namespace names shown above is mine but the bug issue is non dependent. Using the default namespaces will produce a similar compilation error.
If needed, you will find my config.json file content below
openapi-generator version
3.1.2-SNAPSHOT
OpenAPI declaration file content or url
config.json :
Command line used for generation
Generate :
Compile :
Steps to reproduce
Generate & compile
Related issues/PRs
N/A
Suggest a fix/enhancement
In case the generator needs to let this behavior as this, include systematically the ModelBase.h header file ... but I don't think its the best proposal ever seen 🤣
The generator should add the using namespace xxx::yyyy::model only when using, at least, one model class.
The text was updated successfully, but these errors were encountered: