mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 05:56:16 +00:00
[C++][RESTSDK] models header fix (#2750)
* Fix issue including header, the filename not the class name should be used to import a header file. * Include header file name, not class name. Header file name and class name differ. * Update petstore samples
This commit is contained in:
@@ -208,7 +208,7 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen {
|
||||
if (importMapping.containsKey(name)) {
|
||||
return importMapping.get(name);
|
||||
} else {
|
||||
return "#include \"" + sanitizeName(name) + ".h\"";
|
||||
return "#include \"" + toModelFilename(name) + ".h\"";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{>licenseInfo}}
|
||||
{{#models}}{{#model}}
|
||||
|
||||
#include "{{classname}}.h"
|
||||
#include "{{classFilename}}.h"
|
||||
|
||||
{{#modelNamespaceDeclarations}}
|
||||
namespace {{this}} {
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.3.4
|
||||
4.0.0-SNAPSHOT
|
||||
Reference in New Issue
Block a user