mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-04 14:40:53 +00:00
fix(cpp-pistache-server): Add support for AnyType objects (#13232)
Co-authored-by: Ryan Shea <ryan.shea3@t-mobile.com>
This commit is contained in:
parent
b5fe7d02b0
commit
8c79f6d2c9
@ -29,6 +29,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
| Type/Alias | Imports |
|
| Type/Alias | Imports |
|
||||||
| ---------- | ------- |
|
| ---------- | ------- |
|
||||||
|Object|#include "Object.h"|
|
|Object|#include "Object.h"|
|
||||||
|
|nlohmann::json|#include <nlohmann/json.hpp>|
|
||||||
|std::map|#include <map>|
|
|std::map|#include <map>|
|
||||||
|std::string|#include <string>|
|
|std::string|#include <string>|
|
||||||
|std::vector|#include <vector>|
|
|std::vector|#include <vector>|
|
||||||
|
@ -139,12 +139,14 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
|||||||
typeMapping.put("UUID", "std::string");
|
typeMapping.put("UUID", "std::string");
|
||||||
typeMapping.put("URI", "std::string");
|
typeMapping.put("URI", "std::string");
|
||||||
typeMapping.put("ByteArray", "std::string");
|
typeMapping.put("ByteArray", "std::string");
|
||||||
|
typeMapping.put("AnyType", "nlohmann::json");
|
||||||
|
|
||||||
super.importMapping = new HashMap<>();
|
super.importMapping = new HashMap<>();
|
||||||
importMapping.put("std::vector", "#include <vector>");
|
importMapping.put("std::vector", "#include <vector>");
|
||||||
importMapping.put("std::map", "#include <map>");
|
importMapping.put("std::map", "#include <map>");
|
||||||
importMapping.put("std::string", "#include <string>");
|
importMapping.put("std::string", "#include <string>");
|
||||||
importMapping.put("Object", "#include \"Object.h\"");
|
importMapping.put("Object", "#include \"Object.h\"");
|
||||||
|
importMapping.put("nlohmann::json", "#include <nlohmann/json.hpp>");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user