mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-08 08:30:56 +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:
parent
567eb6cdd3
commit
0ebc714d29
@ -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
|
Loading…
x
Reference in New Issue
Block a user