-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[BUG] [C++][Pistache] generating API include undefined "Object.h" #18553
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
[BUG] [C++][Pistache] generating API include undefined "Object.h" #18553
Conversation
…fined "Object.h" (OpenAPITools#2769) Should handle Object.h, AnyType.h correctly. Set.h also tested. - #include Object.h removed and replaced by a typeMapping.put(object, nlohmann::json) like suggested in other issues - object had an invalid syntax: ':' instead of '::' in types with namespace - extra include of #include nlohmann/json.h removed when there's already #include <nlohmann/json.hpp> - nlohmann::json is excluded from model namespace Tested with custom petstore played, with suggested openapi specs coming from issues OpenAPITools#2769, OpenAPITools#10266, OpenAPITools#14234 ```bash rm -rf samples/server/petstore/cpp-pistache-everything/ && ./bin/generate-samples.sh ./bin/configs/cpp-pistache-server-cpp-pistache-everything.yaml && cd samples/server/petstore/cpp-pistache-everything/ && mkdir build && cd build && cmake .. && cmake --build . --parallel ```
|
thanks for the PR. suggestion (optional): what about adding a github work under ./github/worfklows to test |
|
please commit the new files in samples/server/petstore/cpp-pistache-everything/ when you've time |
But they are others issues to correct in the C++ pistache generator, and I continue correcting them using As soon I will have enough knowledge to declare a workflow for it, I will, when submitting a next PR. |
|
please update the new sample one more time: https://github.com/OpenAPITools/openapi-generator/actions/runs/8933887779/job/24547007194?pr=18553 |
|
|
|
thanks for the PR. let's give it a try |
…fined "Object.h" (#2769)
Should handle Object.h, AnyType.h correctly. Set.h also tested.
Tested with custom petstore played, with suggested openapi specs coming from issues #2769, #10266, #14234
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master(upcoming 7.1.0 minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)