[cpp-restsdk] Change build folder structure to match include folder structure in installed client (#11487)

* change source folder structure

* fix importMapping
This commit is contained in:
Sergii Baitala
2022-02-24 08:35:59 +02:00
committed by GitHub
parent c5213e3b5e
commit 237706df64
61 changed files with 216 additions and 217 deletions

View File

@@ -44,6 +44,7 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen {
protected String packageVersion = "1.0.0"; protected String packageVersion = "1.0.0";
protected String declspec = ""; protected String declspec = "";
protected String defaultInclude = ""; protected String defaultInclude = "";
protected String apiDirName = "api";
protected String modelDirName = "model"; protected String modelDirName = "model";
private final Set<String> parentModels = new HashSet<>(); private final Set<String> parentModels = new HashSet<>();
@@ -143,29 +144,6 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen {
VARIABLE_NAME_FIRST_CHARACTER_UPPERCASE_DESC, VARIABLE_NAME_FIRST_CHARACTER_UPPERCASE_DESC,
Boolean.toString(this.variableNameFirstCharacterUppercase)); Boolean.toString(this.variableNameFirstCharacterUppercase));
supportingFiles.add(new SupportingFile("modelbase-header.mustache", "", "ModelBase.h"));
supportingFiles.add(new SupportingFile("modelbase-source.mustache", "", "ModelBase.cpp"));
supportingFiles.add(new SupportingFile("object-header.mustache", "", "Object.h"));
supportingFiles.add(new SupportingFile("object-source.mustache", "", "Object.cpp"));
supportingFiles.add(new SupportingFile("apiclient-header.mustache", "", "ApiClient.h"));
supportingFiles.add(new SupportingFile("apiclient-source.mustache", "", "ApiClient.cpp"));
supportingFiles.add(new SupportingFile("apiconfiguration-header.mustache", "", "ApiConfiguration.h"));
supportingFiles.add(new SupportingFile("apiconfiguration-source.mustache", "", "ApiConfiguration.cpp"));
supportingFiles.add(new SupportingFile("apiexception-header.mustache", "", "ApiException.h"));
supportingFiles.add(new SupportingFile("apiexception-source.mustache", "", "ApiException.cpp"));
supportingFiles.add(new SupportingFile("ihttpbody-header.mustache", "", "IHttpBody.h"));
supportingFiles.add(new SupportingFile("jsonbody-header.mustache", "", "JsonBody.h"));
supportingFiles.add(new SupportingFile("jsonbody-source.mustache", "", "JsonBody.cpp"));
supportingFiles.add(new SupportingFile("httpcontent-header.mustache", "", "HttpContent.h"));
supportingFiles.add(new SupportingFile("httpcontent-source.mustache", "", "HttpContent.cpp"));
supportingFiles.add(new SupportingFile("multipart-header.mustache", "", "MultipartFormData.h"));
supportingFiles.add(new SupportingFile("multipart-source.mustache", "", "MultipartFormData.cpp"));
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
supportingFiles.add(new SupportingFile("cmake-lists.mustache", "", "CMakeLists.txt"));
supportingFiles.add(new SupportingFile("cmake-config.mustache", "", "Config.cmake.in"));
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
languageSpecificPrimitives = new HashSet<>( languageSpecificPrimitives = new HashSet<>(
Arrays.asList("int", "char", "bool", "long", "float", "double", "int32_t", "int64_t")); Arrays.asList("int", "char", "bool", "long", "float", "double", "int32_t", "int64_t"));
@@ -229,24 +207,54 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen {
additionalProperties.put("declspec", declspec); additionalProperties.put("declspec", declspec);
additionalProperties.put("defaultInclude", defaultInclude); additionalProperties.put("defaultInclude", defaultInclude);
additionalProperties.put(RESERVED_WORD_PREFIX_OPTION, reservedWordPrefix); additionalProperties.put(RESERVED_WORD_PREFIX_OPTION, reservedWordPrefix);
importMapping.put("HttpContent", "#include \"" + packageName + "/" + "HttpContent.h\"");
importMapping.put("Object", "#include \"" + packageName + "/" + "Object.h\"");
supportingFiles.add(new SupportingFile("modelbase-header.mustache", getHeaderFolder(), "ModelBase.h"));
supportingFiles.add(new SupportingFile("modelbase-source.mustache", getSourceFolder(), "ModelBase.cpp"));
supportingFiles.add(new SupportingFile("object-header.mustache", getHeaderFolder(), "Object.h"));
supportingFiles.add(new SupportingFile("object-source.mustache", getSourceFolder(), "Object.cpp"));
supportingFiles.add(new SupportingFile("apiclient-header.mustache", getHeaderFolder(), "ApiClient.h"));
supportingFiles.add(new SupportingFile("apiclient-source.mustache", getSourceFolder(), "ApiClient.cpp"));
supportingFiles.add(new SupportingFile("apiconfiguration-header.mustache", getHeaderFolder(), "ApiConfiguration.h"));
supportingFiles.add(new SupportingFile("apiconfiguration-source.mustache", getSourceFolder(), "ApiConfiguration.cpp"));
supportingFiles.add(new SupportingFile("apiexception-header.mustache", getHeaderFolder(), "ApiException.h"));
supportingFiles.add(new SupportingFile("apiexception-source.mustache", getSourceFolder(), "ApiException.cpp"));
supportingFiles.add(new SupportingFile("ihttpbody-header.mustache", getHeaderFolder(), "IHttpBody.h"));
supportingFiles.add(new SupportingFile("jsonbody-header.mustache", getHeaderFolder(), "JsonBody.h"));
supportingFiles.add(new SupportingFile("jsonbody-source.mustache", getSourceFolder(), "JsonBody.cpp"));
supportingFiles.add(new SupportingFile("httpcontent-header.mustache", getHeaderFolder(), "HttpContent.h"));
supportingFiles.add(new SupportingFile("httpcontent-source.mustache", getSourceFolder(), "HttpContent.cpp"));
supportingFiles.add(new SupportingFile("multipart-header.mustache", getHeaderFolder(), "MultipartFormData.h"));
supportingFiles.add(new SupportingFile("multipart-source.mustache", getSourceFolder(), "MultipartFormData.cpp"));
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
supportingFiles.add(new SupportingFile("cmake-lists.mustache", "", "CMakeLists.txt"));
supportingFiles.add(new SupportingFile("cmake-config.mustache", "", "Config.cmake.in"));
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
} }
/** protected String getHeaderFolder() {
* Location to write model files. You can use the modelPackage() as defined return "include/" + packageName;
* when the class is instantiated }
*/
@Override protected String getSourceFolder() {
public String modelFileFolder() { return "src";
return outputFolder + "/" + modelDirName;
} }
/**
* Location to write api files. You can use the apiPackage() as defined when
* the class is instantiated
*/
@Override @Override
public String apiFileFolder() { public String apiFilename(String templateName, String tag) {
return outputFolder + "/api"; String suffix = apiTemplateFiles().get(templateName);
String targetOutDir = suffix.equals(".h") ? getHeaderFolder() : getSourceFolder();
return outputFolder + "/" + targetOutDir + "/" + apiDirName + "/" + toApiFilename(tag) + suffix;
}
@Override
public String modelFilename(String templateName, String modelName) {
String suffix = modelTemplateFiles().get(templateName);
String targetOutDir = suffix.equals(".h") ? getHeaderFolder() : getSourceFolder();
return outputFolder + "/" + targetOutDir + "/" + modelDirName + "/" + toModelFilename(modelName) + suffix;
} }
@Override @Override
@@ -254,7 +262,7 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen {
if (importMapping.containsKey(name)) { if (importMapping.containsKey(name)) {
return importMapping.get(name); return importMapping.get(name);
} else { } else {
return "#include \"" + modelDirName + "/" + toModelFilename(name) + ".h\""; return "#include \"" + packageName + "/" + modelDirName + "/" + toModelFilename(name) + ".h\"";
} }
} }

View File

@@ -10,8 +10,8 @@
{{{defaultInclude}}} {{{defaultInclude}}}
#include "ApiClient.h" #include "{{packageName}}/ApiClient.h"
{{^hasModelImport}}#include "ModelBase.h"{{/hasModelImport}} {{^hasModelImport}}#include "{{packageName}}/ModelBase.h"{{/hasModelImport}}
{{#imports}}{{{import}}} {{#imports}}{{{import}}}
{{/imports}} {{/imports}}
#include <boost/optional.hpp> #include <boost/optional.hpp>

View File

@@ -1,15 +1,15 @@
{{>licenseInfo}} {{>licenseInfo}}
{{#operations}} {{#operations}}
#include "{{classname}}.h" #include "{{packageName}}/api/{{classname}}.h"
#include "IHttpBody.h" #include "{{packageName}}/IHttpBody.h"
#include "JsonBody.h" #include "{{packageName}}/JsonBody.h"
#include "MultipartFormData.h" #include "{{packageName}}/MultipartFormData.h"
#include <unordered_set>
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <unordered_set>
{{#apiNamespaceDeclarations}} {{#apiNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {
{{/apiNamespaceDeclarations}} {{/apiNamespaceDeclarations}}

View File

@@ -9,14 +9,10 @@
#define {{apiHeaderGuardPrefix}}_ApiClient_H_ #define {{apiHeaderGuardPrefix}}_ApiClient_H_
{{{defaultInclude}}} {{{defaultInclude}}}
#include "ApiConfiguration.h" #include "{{packageName}}/ApiConfiguration.h"
#include "ApiException.h" #include "{{packageName}}/ApiException.h"
#include "IHttpBody.h" #include "{{packageName}}/IHttpBody.h"
#include "HttpContent.h" #include "{{packageName}}/HttpContent.h"
#include <memory>
#include <vector>
#include <functional>
#if defined (_WIN32) || defined (_WIN64) #if defined (_WIN32) || defined (_WIN64)
#undef U #undef U
@@ -25,6 +21,10 @@
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/http_client.h> #include <cpprest/http_client.h>
#include <memory>
#include <vector>
#include <functional>
{{#apiNamespaceDeclarations}} {{#apiNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {
{{/apiNamespaceDeclarations}} {{/apiNamespaceDeclarations}}

View File

@@ -1,7 +1,7 @@
{{>licenseInfo}} {{>licenseInfo}}
#include "ApiClient.h" #include "{{packageName}}/ApiClient.h"
#include "MultipartFormData.h" #include "{{packageName}}/MultipartFormData.h"
#include "ModelBase.h" #include "{{packageName}}/ModelBase.h"
#include <sstream> #include <sstream>
#include <limits> #include <limits>

View File

@@ -10,10 +10,11 @@
{{{defaultInclude}}} {{{defaultInclude}}}
#include <map>
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/http_client.h> #include <cpprest/http_client.h>
#include <map>
{{#apiNamespaceDeclarations}} {{#apiNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {
{{/apiNamespaceDeclarations}} {{/apiNamespaceDeclarations}}

View File

@@ -1,5 +1,5 @@
{{>licenseInfo}} {{>licenseInfo}}
#include "ApiConfiguration.h" #include "{{packageName}}/ApiConfiguration.h"
{{#apiNamespaceDeclarations}} {{#apiNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {

View File

@@ -10,12 +10,11 @@
{{{defaultInclude}}} {{{defaultInclude}}}
#include <memory>
#include <map>
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/http_msg.h> #include <cpprest/http_msg.h>
#include <memory>
#include <map>
{{#apiNamespaceDeclarations}} {{#apiNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {

View File

@@ -1,5 +1,5 @@
{{>licenseInfo}} {{>licenseInfo}}
#include "ApiException.h" #include "{{packageName}}/ApiException.h"
{{#apiNamespaceDeclarations}} {{#apiNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {

View File

@@ -1,5 +1,5 @@
@PACKAGE_INIT@ @PACKAGE_INIT@
include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake) include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake)
check_required_components("@PROJECT_NAME@") check_required_components("@PROJECT_NAME@")

View File

@@ -29,8 +29,8 @@ find_package(Boost REQUIRED)
include(GNUInstallDirs) include(GNUInstallDirs)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
file(GLOB_RECURSE HEADER_FILES "*.h") file(GLOB_RECURSE HEADER_FILES "include/*.h")
file(GLOB_RECURSE SOURCE_FILES "*.cpp") file(GLOB_RECURSE SOURCE_FILES "src/*.cpp")
add_library(${PROJECT_NAME} ${HEADER_FILES} ${SOURCE_FILES}) add_library(${PROJECT_NAME} ${HEADER_FILES} ${SOURCE_FILES})
@@ -42,7 +42,7 @@ target_compile_options(${PROJECT_NAME}
target_include_directories(${PROJECT_NAME} target_include_directories(${PROJECT_NAME}
PUBLIC PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
) )
@@ -76,9 +76,8 @@ install(
) )
install( install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h"
) )
install( install(

View File

@@ -10,10 +10,10 @@
{{{defaultInclude}}} {{{defaultInclude}}}
#include <memory>
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <memory>
{{#modelNamespaceDeclarations}} {{#modelNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {
{{/modelNamespaceDeclarations}} {{/modelNamespaceDeclarations}}

View File

@@ -1,5 +1,5 @@
{{>licenseInfo}} {{>licenseInfo}}
#include "HttpContent.h" #include "{{packageName}}/HttpContent.h"
{{#modelNamespaceDeclarations}} {{#modelNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {

View File

@@ -9,7 +9,7 @@
#define {{modelHeaderGuardPrefix}}_JsonBody_H_ #define {{modelHeaderGuardPrefix}}_JsonBody_H_
{{{defaultInclude}}} {{{defaultInclude}}}
#include "IHttpBody.h" #include "{{packageName}}/IHttpBody.h"
#include <cpprest/json.h> #include <cpprest/json.h>

View File

@@ -1,5 +1,5 @@
{{>licenseInfo}} {{>licenseInfo}}
#include "JsonBody.h" #include "{{packageName}}/JsonBody.h"
{{#modelNamespaceDeclarations}} {{#modelNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {

View File

@@ -10,7 +10,7 @@
{{^parent}} {{^parent}}
{{{defaultInclude}}} {{{defaultInclude}}}
#include "ModelBase.h" #include "{{packageName}}/ModelBase.h"
{{/parent}} {{/parent}}
{{#imports}}{{{this}}} {{#imports}}{{{this}}}

View File

@@ -1,13 +1,12 @@
{{>licenseInfo}} {{>licenseInfo}}
{{#models}}{{#model}} {{#models}}{{#model}}
#include "{{classFilename}}.h" #include "{{packageName}}/model/{{classFilename}}.h"
{{#modelNamespaceDeclarations}} {{#modelNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {
{{/modelNamespaceDeclarations}} {{/modelNamespaceDeclarations}}
{{#isEnum}} {{#isEnum}}
namespace namespace

View File

@@ -9,15 +9,16 @@
#define {{modelHeaderGuardPrefix}}_ModelBase_H_ #define {{modelHeaderGuardPrefix}}_ModelBase_H_
{{{defaultInclude}}} {{{defaultInclude}}}
#include <map>
#include <vector>
#include "HttpContent.h" #include "{{packageName}}/HttpContent.h"
#include "MultipartFormData.h" #include "{{packageName}}/MultipartFormData.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/json.h> #include <cpprest/json.h>
#include <map>
#include <vector>
{{#modelNamespaceDeclarations}} {{#modelNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {
{{/modelNamespaceDeclarations}} {{/modelNamespaceDeclarations}}

View File

@@ -1,5 +1,5 @@
{{>licenseInfo}} {{>licenseInfo}}
#include "ModelBase.h" #include "{{packageName}}/ModelBase.h"
{{#modelNamespaceDeclarations}} {{#modelNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {

View File

@@ -9,16 +9,15 @@
#define {{modelHeaderGuardPrefix}}_MultipartFormData_H_ #define {{modelHeaderGuardPrefix}}_MultipartFormData_H_
{{{defaultInclude}}} {{{defaultInclude}}}
#include "IHttpBody.h" #include "{{packageName}}/IHttpBody.h"
#include "HttpContent.h" #include "{{packageName}}/HttpContent.h"
#include <cpprest/details/basic_types.h>
#include <vector> #include <vector>
#include <map> #include <map>
#include <memory> #include <memory>
#include <cpprest/details/basic_types.h>
{{#modelNamespaceDeclarations}} {{#modelNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {
{{/modelNamespaceDeclarations}} {{/modelNamespaceDeclarations}}

View File

@@ -1,6 +1,6 @@
{{>licenseInfo}} {{>licenseInfo}}
#include "MultipartFormData.h" #include "{{packageName}}/MultipartFormData.h"
#include "ModelBase.h" #include "{{packageName}}/ModelBase.h"
#include <boost/uuid/random_generator.hpp> #include <boost/uuid/random_generator.hpp>
#include <boost/uuid/uuid_io.hpp> #include <boost/uuid/uuid_io.hpp>

View File

@@ -9,7 +9,7 @@
#define {{modelHeaderGuardPrefix}}_Object_H_ #define {{modelHeaderGuardPrefix}}_Object_H_
{{{defaultInclude}}} {{{defaultInclude}}}
#include "ModelBase.h" #include "{{packageName}}/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/json.h> #include <cpprest/json.h>

View File

@@ -1,5 +1,5 @@
{{>licenseInfo}} {{>licenseInfo}}
#include "Object.h" #include "{{packageName}}/Object.h"
{{#modelNamespaceDeclarations}} {{#modelNamespaceDeclarations}}
namespace {{this}} { namespace {{this}} {

View File

@@ -1,40 +1,40 @@
.gitignore .gitignore
ApiClient.cpp
ApiClient.h
ApiConfiguration.cpp
ApiConfiguration.h
ApiException.cpp
ApiException.h
CMakeLists.txt CMakeLists.txt
Config.cmake.in Config.cmake.in
HttpContent.cpp
HttpContent.h
IHttpBody.h
JsonBody.cpp
JsonBody.h
ModelBase.cpp
ModelBase.h
MultipartFormData.cpp
MultipartFormData.h
Object.cpp
Object.h
README.md README.md
api/PetApi.cpp
api/PetApi.h
api/StoreApi.cpp
api/StoreApi.h
api/UserApi.cpp
api/UserApi.h
git_push.sh git_push.sh
model/ApiResponse.cpp include/CppRestPetstoreClient/ApiClient.h
model/ApiResponse.h include/CppRestPetstoreClient/ApiConfiguration.h
model/Category.cpp include/CppRestPetstoreClient/ApiException.h
model/Category.h include/CppRestPetstoreClient/HttpContent.h
model/Order.cpp include/CppRestPetstoreClient/IHttpBody.h
model/Order.h include/CppRestPetstoreClient/JsonBody.h
model/Pet.cpp include/CppRestPetstoreClient/ModelBase.h
model/Pet.h include/CppRestPetstoreClient/MultipartFormData.h
model/Tag.cpp include/CppRestPetstoreClient/Object.h
model/Tag.h include/CppRestPetstoreClient/api/PetApi.h
model/User.cpp include/CppRestPetstoreClient/api/StoreApi.h
model/User.h include/CppRestPetstoreClient/api/UserApi.h
include/CppRestPetstoreClient/model/ApiResponse.h
include/CppRestPetstoreClient/model/Category.h
include/CppRestPetstoreClient/model/Order.h
include/CppRestPetstoreClient/model/Pet.h
include/CppRestPetstoreClient/model/Tag.h
include/CppRestPetstoreClient/model/User.h
src/ApiClient.cpp
src/ApiConfiguration.cpp
src/ApiException.cpp
src/HttpContent.cpp
src/JsonBody.cpp
src/ModelBase.cpp
src/MultipartFormData.cpp
src/Object.cpp
src/api/PetApi.cpp
src/api/StoreApi.cpp
src/api/UserApi.cpp
src/model/ApiResponse.cpp
src/model/Category.cpp
src/model/Order.cpp
src/model/Pet.cpp
src/model/Tag.cpp
src/model/User.cpp

View File

@@ -29,8 +29,8 @@ find_package(Boost REQUIRED)
include(GNUInstallDirs) include(GNUInstallDirs)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
file(GLOB_RECURSE HEADER_FILES "*.h") file(GLOB_RECURSE HEADER_FILES "include/*.h")
file(GLOB_RECURSE SOURCE_FILES "*.cpp") file(GLOB_RECURSE SOURCE_FILES "src/*.cpp")
add_library(${PROJECT_NAME} ${HEADER_FILES} ${SOURCE_FILES}) add_library(${PROJECT_NAME} ${HEADER_FILES} ${SOURCE_FILES})
@@ -42,7 +42,7 @@ target_compile_options(${PROJECT_NAME}
target_include_directories(${PROJECT_NAME} target_include_directories(${PROJECT_NAME}
PUBLIC PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
) )
@@ -76,9 +76,8 @@ install(
) )
install( install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h"
) )
install( install(

View File

@@ -1,5 +1,5 @@
@PACKAGE_INIT@ @PACKAGE_INIT@
include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake) include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake)
check_required_components("@PROJECT_NAME@") check_required_components("@PROJECT_NAME@")

View File

@@ -19,14 +19,10 @@
#define ORG_OPENAPITOOLS_CLIENT_API_ApiClient_H_ #define ORG_OPENAPITOOLS_CLIENT_API_ApiClient_H_
#include "ApiConfiguration.h" #include "CppRestPetstoreClient/ApiConfiguration.h"
#include "ApiException.h" #include "CppRestPetstoreClient/ApiException.h"
#include "IHttpBody.h" #include "CppRestPetstoreClient/IHttpBody.h"
#include "HttpContent.h" #include "CppRestPetstoreClient/HttpContent.h"
#include <memory>
#include <vector>
#include <functional>
#if defined (_WIN32) || defined (_WIN64) #if defined (_WIN32) || defined (_WIN64)
#undef U #undef U
@@ -35,6 +31,10 @@
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/http_client.h> #include <cpprest/http_client.h>
#include <memory>
#include <vector>
#include <functional>
namespace org { namespace org {
namespace openapitools { namespace openapitools {
namespace client { namespace client {

View File

@@ -20,10 +20,11 @@
#include <map>
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/http_client.h> #include <cpprest/http_client.h>
#include <map>
namespace org { namespace org {
namespace openapitools { namespace openapitools {
namespace client { namespace client {

View File

@@ -20,12 +20,11 @@
#include <memory>
#include <map>
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/http_msg.h> #include <cpprest/http_msg.h>
#include <memory>
#include <map>
namespace org { namespace org {
namespace openapitools { namespace openapitools {

View File

@@ -20,10 +20,10 @@
#include <memory>
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <memory>
namespace org { namespace org {
namespace openapitools { namespace openapitools {
namespace client { namespace client {

View File

@@ -19,7 +19,7 @@
#define ORG_OPENAPITOOLS_CLIENT_MODEL_JsonBody_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_JsonBody_H_
#include "IHttpBody.h" #include "CppRestPetstoreClient/IHttpBody.h"
#include <cpprest/json.h> #include <cpprest/json.h>

View File

@@ -19,15 +19,16 @@
#define ORG_OPENAPITOOLS_CLIENT_MODEL_ModelBase_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_ModelBase_H_
#include <map>
#include <vector>
#include "HttpContent.h" #include "CppRestPetstoreClient/HttpContent.h"
#include "MultipartFormData.h" #include "CppRestPetstoreClient/MultipartFormData.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/json.h> #include <cpprest/json.h>
#include <map>
#include <vector>
namespace org { namespace org {
namespace openapitools { namespace openapitools {
namespace client { namespace client {

View File

@@ -19,16 +19,15 @@
#define ORG_OPENAPITOOLS_CLIENT_MODEL_MultipartFormData_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_MultipartFormData_H_
#include "IHttpBody.h" #include "CppRestPetstoreClient/IHttpBody.h"
#include "HttpContent.h" #include "CppRestPetstoreClient/HttpContent.h"
#include <cpprest/details/basic_types.h>
#include <vector> #include <vector>
#include <map> #include <map>
#include <memory> #include <memory>
#include <cpprest/details/basic_types.h>
namespace org { namespace org {
namespace openapitools { namespace openapitools {
namespace client { namespace client {

View File

@@ -19,7 +19,7 @@
#define ORG_OPENAPITOOLS_CLIENT_MODEL_Object_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_Object_H_
#include "ModelBase.h" #include "CppRestPetstoreClient/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/json.h> #include <cpprest/json.h>

View File

@@ -20,11 +20,11 @@
#include "ApiClient.h" #include "CppRestPetstoreClient/ApiClient.h"
#include "model/ApiResponse.h" #include "CppRestPetstoreClient/model/ApiResponse.h"
#include "HttpContent.h" #include "CppRestPetstoreClient/HttpContent.h"
#include "model/Pet.h" #include "CppRestPetstoreClient/model/Pet.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <boost/optional.hpp> #include <boost/optional.hpp>

View File

@@ -20,9 +20,9 @@
#include "ApiClient.h" #include "CppRestPetstoreClient/ApiClient.h"
#include "model/Order.h" #include "CppRestPetstoreClient/model/Order.h"
#include <map> #include <map>
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <boost/optional.hpp> #include <boost/optional.hpp>

View File

@@ -20,9 +20,9 @@
#include "ApiClient.h" #include "CppRestPetstoreClient/ApiClient.h"
#include "model/User.h" #include "CppRestPetstoreClient/model/User.h"
#include <vector> #include <vector>
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <boost/optional.hpp> #include <boost/optional.hpp>

View File

@@ -19,7 +19,7 @@
#define ORG_OPENAPITOOLS_CLIENT_MODEL_ApiResponse_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_ApiResponse_H_
#include "ModelBase.h" #include "CppRestPetstoreClient/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>

View File

@@ -19,7 +19,7 @@
#define ORG_OPENAPITOOLS_CLIENT_MODEL_Category_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_Category_H_
#include "ModelBase.h" #include "CppRestPetstoreClient/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>

View File

@@ -19,7 +19,7 @@
#define ORG_OPENAPITOOLS_CLIENT_MODEL_Order_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_Order_H_
#include "ModelBase.h" #include "CppRestPetstoreClient/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>

View File

@@ -19,12 +19,12 @@
#define ORG_OPENAPITOOLS_CLIENT_MODEL_Pet_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_Pet_H_
#include "ModelBase.h" #include "CppRestPetstoreClient/ModelBase.h"
#include "model/Tag.h" #include "CppRestPetstoreClient/model/Tag.h"
#include "CppRestPetstoreClient/model/Category.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <vector> #include <vector>
#include "model/Category.h"
namespace org { namespace org {
namespace openapitools { namespace openapitools {

View File

@@ -19,7 +19,7 @@
#define ORG_OPENAPITOOLS_CLIENT_MODEL_Tag_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_Tag_H_
#include "ModelBase.h" #include "CppRestPetstoreClient/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>

View File

@@ -19,7 +19,7 @@
#define ORG_OPENAPITOOLS_CLIENT_MODEL_User_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_User_H_
#include "ModelBase.h" #include "CppRestPetstoreClient/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>

View File

@@ -9,9 +9,9 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "ApiClient.h" #include "CppRestPetstoreClient/ApiClient.h"
#include "MultipartFormData.h" #include "CppRestPetstoreClient/MultipartFormData.h"
#include "ModelBase.h" #include "CppRestPetstoreClient/ModelBase.h"
#include <sstream> #include <sstream>
#include <limits> #include <limits>

View File

@@ -9,7 +9,7 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "ApiConfiguration.h" #include "CppRestPetstoreClient/ApiConfiguration.h"
namespace org { namespace org {
namespace openapitools { namespace openapitools {

View File

@@ -9,7 +9,7 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "ApiException.h" #include "CppRestPetstoreClient/ApiException.h"
namespace org { namespace org {
namespace openapitools { namespace openapitools {

View File

@@ -9,7 +9,7 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "HttpContent.h" #include "CppRestPetstoreClient/HttpContent.h"
namespace org { namespace org {
namespace openapitools { namespace openapitools {

View File

@@ -9,7 +9,7 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "JsonBody.h" #include "CppRestPetstoreClient/JsonBody.h"
namespace org { namespace org {
namespace openapitools { namespace openapitools {

View File

@@ -9,7 +9,7 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "ModelBase.h" #include "CppRestPetstoreClient/ModelBase.h"
namespace org { namespace org {
namespace openapitools { namespace openapitools {

View File

@@ -9,8 +9,8 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "MultipartFormData.h" #include "CppRestPetstoreClient/MultipartFormData.h"
#include "ModelBase.h" #include "CppRestPetstoreClient/ModelBase.h"
#include <boost/uuid/random_generator.hpp> #include <boost/uuid/random_generator.hpp>
#include <boost/uuid/uuid_io.hpp> #include <boost/uuid/uuid_io.hpp>

View File

@@ -9,7 +9,7 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "Object.h" #include "CppRestPetstoreClient/Object.h"
namespace org { namespace org {
namespace openapitools { namespace openapitools {

View File

@@ -10,15 +10,15 @@
*/ */
#include "PetApi.h" #include "CppRestPetstoreClient/api/PetApi.h"
#include "IHttpBody.h" #include "CppRestPetstoreClient/IHttpBody.h"
#include "JsonBody.h" #include "CppRestPetstoreClient/JsonBody.h"
#include "MultipartFormData.h" #include "CppRestPetstoreClient/MultipartFormData.h"
#include <unordered_set>
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <unordered_set>
namespace org { namespace org {
namespace openapitools { namespace openapitools {
namespace client { namespace client {

View File

@@ -10,15 +10,15 @@
*/ */
#include "StoreApi.h" #include "CppRestPetstoreClient/api/StoreApi.h"
#include "IHttpBody.h" #include "CppRestPetstoreClient/IHttpBody.h"
#include "JsonBody.h" #include "CppRestPetstoreClient/JsonBody.h"
#include "MultipartFormData.h" #include "CppRestPetstoreClient/MultipartFormData.h"
#include <unordered_set>
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <unordered_set>
namespace org { namespace org {
namespace openapitools { namespace openapitools {
namespace client { namespace client {

View File

@@ -10,15 +10,15 @@
*/ */
#include "UserApi.h" #include "CppRestPetstoreClient/api/UserApi.h"
#include "IHttpBody.h" #include "CppRestPetstoreClient/IHttpBody.h"
#include "JsonBody.h" #include "CppRestPetstoreClient/JsonBody.h"
#include "MultipartFormData.h" #include "CppRestPetstoreClient/MultipartFormData.h"
#include <unordered_set>
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <unordered_set>
namespace org { namespace org {
namespace openapitools { namespace openapitools {
namespace client { namespace client {

View File

@@ -11,7 +11,7 @@
#include "ApiResponse.h" #include "CppRestPetstoreClient/model/ApiResponse.h"
namespace org { namespace org {
namespace openapitools { namespace openapitools {
@@ -20,7 +20,6 @@ namespace model {
ApiResponse::ApiResponse() ApiResponse::ApiResponse()
{ {
m_Code = 0; m_Code = 0;

View File

@@ -11,7 +11,7 @@
#include "Category.h" #include "CppRestPetstoreClient/model/Category.h"
namespace org { namespace org {
namespace openapitools { namespace openapitools {
@@ -20,7 +20,6 @@ namespace model {
Category::Category() Category::Category()
{ {
m_Id = 0L; m_Id = 0L;

View File

@@ -11,7 +11,7 @@
#include "Order.h" #include "CppRestPetstoreClient/model/Order.h"
namespace org { namespace org {
namespace openapitools { namespace openapitools {
@@ -20,7 +20,6 @@ namespace model {
Order::Order() Order::Order()
{ {
m_Id = 0L; m_Id = 0L;

View File

@@ -11,7 +11,7 @@
#include "Pet.h" #include "CppRestPetstoreClient/model/Pet.h"
namespace org { namespace org {
namespace openapitools { namespace openapitools {
@@ -20,7 +20,6 @@ namespace model {
Pet::Pet() Pet::Pet()
{ {
m_Id = 0L; m_Id = 0L;

View File

@@ -11,7 +11,7 @@
#include "Tag.h" #include "CppRestPetstoreClient/model/Tag.h"
namespace org { namespace org {
namespace openapitools { namespace openapitools {
@@ -20,7 +20,6 @@ namespace model {
Tag::Tag() Tag::Tag()
{ {
m_Id = 0L; m_Id = 0L;

View File

@@ -11,7 +11,7 @@
#include "User.h" #include "CppRestPetstoreClient/model/User.h"
namespace org { namespace org {
namespace openapitools { namespace openapitools {
@@ -20,7 +20,6 @@ namespace model {
User::User() User::User()
{ {
m_Id = 0L; m_Id = 0L;