-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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] [cpp-ue4] Missing AnyType declaration for any-type objects #10266
Labels
Comments
5 tasks
Closed
6 tasks
6 tasks
5 tasks
mlebihan
added a commit
to mlebihan/openapi-generator
that referenced
this issue
May 2, 2024
…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 ```
mlebihan
added a commit
to mlebihan/openapi-generator
that referenced
this issue
May 2, 2024
…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 ```
5 tasks
wing328
pushed a commit
that referenced
this issue
May 4, 2024
#18553) * [BUG] [C++][Pistache] cpp-pistache-server generating API include undefined "Object.h" (#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 #2769, #10266, #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 ``` * - Adding to samples/server/petstore cpp-pistache-everything * - .md and FILES missing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report Checklist
Description
The UE4 code generator produces invalid code (code that cannot be compiled) for arbitrary-type objects:
Neither a header with name
AnyType.h
is generated nor typeAnyType
declared anywhere in a project.openapi-generator version
master - 5.3.0
OpenAPI declaration file content or url
Full scheme
Generation Details
Steps to reproduce
Related issues/PRs
Similar problem with other generators:
AnyType
#10036 KotlinAnyType
is not defined #7617)AnyType
andBaseValidate
#7458 C#AnyType
is not defined #6332 TypescriptSuggest a fix
Add type mapping
AnyType
->TSharedPtr<FJsonValue>
to keep ability to parse fields later.The text was updated successfully, but these errors were encountered: