diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache index 1df116498b2..0b95b6e25aa 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache @@ -35,7 +35,7 @@ public: {{#allParams}} {{^required}}boost::optional<{{/required}}{{#isFile}}std::shared_ptr<{{/isFile}}{{{dataType}}}{{#isFile}}>{{/isFile}}{{^required}}>{{/required}} {{paramName}}{{#hasMore}},{{/hasMore}} {{/allParams}} - ) = 0; + ) const = 0; {{/operation}} };{{/gmockApis}} @@ -46,7 +46,7 @@ public: using Base = I{{classname}}; {{/gmockApis}} - explicit {{classname}}( std::shared_ptr apiClient ); + explicit {{classname}}( std::shared_ptr apiClient ); {{#gmockApis}} ~{{classname}}() override; @@ -69,11 +69,11 @@ public: {{#allParams}} {{^required}}boost::optional<{{/required}}{{#isFile}}std::shared_ptr<{{/isFile}}{{{dataType}}}{{#isFile}}>{{/isFile}}{{^required}}>{{/required}} {{paramName}}{{#hasMore}},{{/hasMore}} {{/allParams}} - ){{#gmockApis}} override{{/gmockApis}}; + ) const{{#gmockApis}} override{{/gmockApis}}; {{/operation}} protected: - std::shared_ptr m_ApiClient; + std::shared_ptr m_ApiClient; }; {{#apiNamespaceDeclarations}} diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-source.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-source.mustache index c3691a55382..30d2fd7222a 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-source.mustache @@ -16,7 +16,7 @@ namespace {{this}} { using namespace {{modelNamespace}}; -{{classname}}::{{classname}}( std::shared_ptr apiClient ) +{{classname}}::{{classname}}( std::shared_ptr apiClient ) : m_ApiClient(apiClient) { } @@ -26,7 +26,7 @@ using namespace {{modelNamespace}}; } {{#operation}} -pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {{classname}}::{{operationId}}({{#allParams}}{{^required}}boost::optional<{{/required}}{{#isFile}}std::shared_ptr<{{/isFile}}{{{dataType}}}{{#isFile}}>{{/isFile}}{{^required}}>{{/required}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) +pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {{classname}}::{{operationId}}({{#allParams}}{{^required}}boost::optional<{{/required}}{{#isFile}}std::shared_ptr<{{/isFile}}{{{dataType}}}{{#isFile}}>{{/isFile}}{{^required}}>{{/required}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) const { {{#allParams}}{{#required}}{{^isPrimitiveType}}{{^isContainer}} // verify the required parameter '{{paramName}}' is set @@ -36,7 +36,7 @@ pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/r } {{/isContainer}}{{/isPrimitiveType}}{{/required}}{{/allParams}} - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("{{{path}}}"); {{#pathParams}}boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("{{baseName}}") + utility::conversions::to_string_t("}"), ApiClient::parameterToString({{{paramName}}})); {{/pathParams}} diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiclient-header.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiclient-header.mustache index 5bc75edcd28..08a12742d96 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiclient-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiclient-header.mustache @@ -34,7 +34,7 @@ using namespace {{modelNamespace}}; class {{declspec}} ApiClient { public: - ApiClient( std::shared_ptr configuration = nullptr ); + ApiClient( std::shared_ptr configuration = nullptr ); virtual ~ApiClient(); typedef std::function ResponseHandlerType; @@ -42,8 +42,8 @@ public: const ResponseHandlerType& getResponseHandler() const; void setResponseHandler(const ResponseHandlerType& responseHandler); - std::shared_ptr getConfiguration() const; - void setConfiguration(std::shared_ptr configuration); + std::shared_ptr getConfiguration() const; + void setConfiguration(std::shared_ptr configuration); static utility::string_t parameterToString(utility::string_t value); static utility::string_t parameterToString(int32_t value); @@ -70,7 +70,7 @@ public: protected: ResponseHandlerType m_ResponseHandler; - std::shared_ptr m_Configuration; + std::shared_ptr m_Configuration; }; template diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiclient-source.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiclient-source.mustache index b32b76a0fdd..d8e13ede3b9 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiclient-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiclient-source.mustache @@ -21,7 +21,7 @@ namespace {{this}} { using namespace {{modelNamespace}}; -ApiClient::ApiClient(std::shared_ptr configuration ) +ApiClient::ApiClient(std::shared_ptr configuration ) : m_Configuration(configuration) { } @@ -37,11 +37,11 @@ void ApiClient::setResponseHandler(const ResponseHandlerType& responseHandler) { m_ResponseHandler = responseHandler; } -std::shared_ptr ApiClient::getConfiguration() const +std::shared_ptr ApiClient::getConfiguration() const { return m_Configuration; } -void ApiClient::setConfiguration(std::shared_ptr configuration) +void ApiClient::setConfiguration(std::shared_ptr configuration) { m_Configuration = configuration; } @@ -108,7 +108,7 @@ pplx::task ApiClient::callApi( web::http::client::http_client client(m_Configuration->getBaseUrl(), m_Configuration->getHttpConfig()); web::http::http_request request; - for ( auto& kvp : headerParams ) + for (const auto& kvp : headerParams) { request.headers().add(kvp.first, kvp.second); } @@ -116,18 +116,18 @@ pplx::task ApiClient::callApi( if (fileParams.size() > 0) { MultipartFormData uploadData; - for (auto& kvp : formParams) + for (const auto& kvp : formParams) { uploadData.add(ModelBase::toHttpContent(kvp.first, kvp.second)); } - for (auto& kvp : fileParams) + for (const auto& kvp : fileParams) { uploadData.add(ModelBase::toHttpContent(kvp.first, kvp.second)); } std::stringstream data; uploadData.writeTo(data); auto bodyString = data.str(); - auto length = bodyString.size(); + const auto length = bodyString.size(); request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, utility::conversions::to_string_t("multipart/form-data; boundary=") + uploadData.getBoundary()); } else @@ -137,7 +137,7 @@ pplx::task ApiClient::callApi( std::stringstream data; postBody->writeTo(data); auto bodyString = data.str(); - auto length = bodyString.size(); + const auto length = bodyString.size(); request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, contentType); } else @@ -157,7 +157,7 @@ pplx::task ApiClient::callApi( else { web::http::uri_builder formData; - for (auto& kvp : formParams) + for (const auto& kvp : formParams) { formData.append_query(kvp.first, kvp.second); } @@ -170,7 +170,7 @@ pplx::task ApiClient::callApi( } web::http::uri_builder builder(path); - for (auto& kvp : queryParams) + for (const auto& kvp : queryParams) { builder.append_query(kvp.first, kvp.second); } diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiconfiguration-header.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiconfiguration-header.mustache index 35375760b7a..8f3b0c2dd8f 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiconfiguration-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiconfiguration-header.mustache @@ -24,7 +24,7 @@ public: ApiConfiguration(); virtual ~ApiConfiguration(); - web::http::client::http_client_config& getHttpConfig(); + const web::http::client::http_client_config& getHttpConfig() const; void setHttpConfig( web::http::client::http_client_config& value ); utility::string_t getBaseUrl() const; @@ -34,6 +34,7 @@ public: void setUserAgent( const utility::string_t value ); std::map& getDefaultHeaders(); + const std::map& getDefaultHeaders() const; utility::string_t getApiKey( const utility::string_t& prefix) const; void setApiKey( const utility::string_t& prefix, const utility::string_t& apiKey ); diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiconfiguration-source.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiconfiguration-source.mustache index d4a6a660471..6b3dee89fe3 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiconfiguration-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiconfiguration-source.mustache @@ -13,7 +13,7 @@ ApiConfiguration::~ApiConfiguration() { } -web::http::client::http_client_config& ApiConfiguration::getHttpConfig() +const web::http::client::http_client_config& ApiConfiguration::getHttpConfig() const { return m_HttpConfig; } @@ -48,6 +48,11 @@ std::map& ApiConfiguration::getDefaultHead return m_DefaultHeaders; } +const std::map& ApiConfiguration::getDefaultHeaders() const +{ + return m_DefaultHeaders; +} + utility::string_t ApiConfiguration::getApiKey( const utility::string_t& prefix) const { auto result = m_ApiKeys.find(prefix); diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache index 9784bdaee67..1faa870e708 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache @@ -265,7 +265,7 @@ void {{classname}}::fromJson(const web::json::value& val) } else { - {{{items.datatype}}} newItem({{{items.defaultValue}}}); + auto newItem = std::make_shared<{{{items.datatype}}}::element_type>(); newItem->fromJson(item); m_{{name}}.push_back( newItem ); } @@ -309,7 +309,7 @@ void {{classname}}::fromJson(const web::json::value& val) } else { - {{{items.datatype}}} newItem({{{items.defaultValue}}}); + auto newItem = std::make_shared<{{{items.datatype}}}::element_type>(); newItem->fromJson(item.at(utility::conversions::to_string_t("value"))); m_{{name}}.insert(std::pair( key, newItem )); } @@ -344,7 +344,7 @@ void {{classname}}::fromJson(const web::json::value& val) {{/isDateTime}} {{^isDateTime}} {{^isByteArray}} - {{{dataType}}} newItem({{{defaultValue}}}); + auto newItem = std::make_shared<{{{datatype}}}::element_type>(); newItem->fromJson(fieldValue); {{setter}}( newItem ); {{/isByteArray}} @@ -371,7 +371,7 @@ void {{classname}}::fromJson(const web::json::value& val) {{setter}}(ModelBase::fileFromJson(val.at(utility::conversions::to_string_t("{{baseName}}")))); {{/vendorExtensions.x-codegen-file}} {{^vendorExtensions.x-codegen-file}} - {{{dataType}}} new{{name}}({{{defaultValue}}}); + auto new{{name}} = std::make_shared<{{{dataType}}}::element_type>(); new{{name}}->fromJson(val.at(utility::conversions::to_string_t("{{baseName}}"))); {{setter}}( new{{name}} ); {{/vendorExtensions.x-codegen-file}} @@ -553,7 +553,7 @@ void {{classname}}::fromMultiPart(std::shared_ptr multipart, } else { - {{{items.datatype}}} newItem({{{items.defaultValue}}}); + auto newItem = std::make_shared<{{{items.datatype}}}::element_type>(); newItem->fromJson(item); m_{{name}}.push_back( newItem ); } @@ -600,7 +600,7 @@ void {{classname}}::fromMultiPart(std::shared_ptr multipart, } else { - {{{items.datatype}}} newItem({{{items.defaultValue}}}); + auto newItem = std::make_shared<{{{items.datatype}}}::element_type>(); newItem->fromJson(item[utility::conversions::to_string_t("value")]); m_{{name}}.insert(std::pair( key, newItem )); } @@ -633,7 +633,7 @@ void {{classname}}::fromMultiPart(std::shared_ptr multipart, {{^isDateTime}} if(multipart->hasContent(utility::conversions::to_string_t("{{baseName}}"))) { - {{{dataType}}} newItem({{{defaultValue}}}); + auto newItem = std::make_shared<{{{datatype}}}::element_type>(); newItem->fromMultiPart(multipart, utility::conversions::to_string_t("{{baseName}}.")); {{setter}}( newItem ); } @@ -659,7 +659,7 @@ void {{classname}}::fromMultiPart(std::shared_ptr multipart, {{setter}}(multipart->getContent(utility::conversions::to_string_t("{{baseName}}"))); {{/vendorExtensions.x-codegen-file}} {{^vendorExtensions.x-codegen-file}} - {{{dataType}}} new{{name}}({{{defaultValue}}}); + auto new{{name}} = std::make_shared<{{{dataType}}}::element_type>(); new{{name}}->fromMultiPart(multipart, utility::conversions::to_string_t("{{baseName}}.")); {{setter}}( new{{name}} ); {{/vendorExtensions.x-codegen-file}} diff --git a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION index 83a328a9227..58592f031f6 100644 --- a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp index 7aa7c87fc28..75283d69803 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -32,7 +32,7 @@ namespace api { using namespace org::openapitools::client::model; -ApiClient::ApiClient(std::shared_ptr configuration ) +ApiClient::ApiClient(std::shared_ptr configuration ) : m_Configuration(configuration) { } @@ -48,11 +48,11 @@ void ApiClient::setResponseHandler(const ResponseHandlerType& responseHandler) { m_ResponseHandler = responseHandler; } -std::shared_ptr ApiClient::getConfiguration() const +std::shared_ptr ApiClient::getConfiguration() const { return m_Configuration; } -void ApiClient::setConfiguration(std::shared_ptr configuration) +void ApiClient::setConfiguration(std::shared_ptr configuration) { m_Configuration = configuration; } @@ -119,7 +119,7 @@ pplx::task ApiClient::callApi( web::http::client::http_client client(m_Configuration->getBaseUrl(), m_Configuration->getHttpConfig()); web::http::http_request request; - for ( auto& kvp : headerParams ) + for (const auto& kvp : headerParams) { request.headers().add(kvp.first, kvp.second); } @@ -127,18 +127,18 @@ pplx::task ApiClient::callApi( if (fileParams.size() > 0) { MultipartFormData uploadData; - for (auto& kvp : formParams) + for (const auto& kvp : formParams) { uploadData.add(ModelBase::toHttpContent(kvp.first, kvp.second)); } - for (auto& kvp : fileParams) + for (const auto& kvp : fileParams) { uploadData.add(ModelBase::toHttpContent(kvp.first, kvp.second)); } std::stringstream data; uploadData.writeTo(data); auto bodyString = data.str(); - auto length = bodyString.size(); + const auto length = bodyString.size(); request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, utility::conversions::to_string_t("multipart/form-data; boundary=") + uploadData.getBoundary()); } else @@ -148,7 +148,7 @@ pplx::task ApiClient::callApi( std::stringstream data; postBody->writeTo(data); auto bodyString = data.str(); - auto length = bodyString.size(); + const auto length = bodyString.size(); request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, contentType); } else @@ -168,7 +168,7 @@ pplx::task ApiClient::callApi( else { web::http::uri_builder formData; - for (auto& kvp : formParams) + for (const auto& kvp : formParams) { formData.append_query(kvp.first, kvp.second); } @@ -181,7 +181,7 @@ pplx::task ApiClient::callApi( } web::http::uri_builder builder(path); - for (auto& kvp : queryParams) + for (const auto& kvp : queryParams) { builder.append_query(kvp.first, kvp.second); } diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.h b/samples/client/petstore/cpp-restsdk/client/ApiClient.h index bfabf55ec9b..79539f4e5a4 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiClient.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -45,7 +45,7 @@ using namespace org::openapitools::client::model; class ApiClient { public: - ApiClient( std::shared_ptr configuration = nullptr ); + ApiClient( std::shared_ptr configuration = nullptr ); virtual ~ApiClient(); typedef std::function ResponseHandlerType; @@ -53,8 +53,8 @@ public: const ResponseHandlerType& getResponseHandler() const; void setResponseHandler(const ResponseHandlerType& responseHandler); - std::shared_ptr getConfiguration() const; - void setConfiguration(std::shared_ptr configuration); + std::shared_ptr getConfiguration() const; + void setConfiguration(std::shared_ptr configuration); static utility::string_t parameterToString(utility::string_t value); static utility::string_t parameterToString(int32_t value); @@ -81,7 +81,7 @@ public: protected: ResponseHandlerType m_ResponseHandler; - std::shared_ptr m_Configuration; + std::shared_ptr m_Configuration; }; template diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp index 0d8f3fde31c..5dc67553286 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -24,7 +24,7 @@ ApiConfiguration::~ApiConfiguration() { } -web::http::client::http_client_config& ApiConfiguration::getHttpConfig() +const web::http::client::http_client_config& ApiConfiguration::getHttpConfig() const { return m_HttpConfig; } @@ -59,6 +59,11 @@ std::map& ApiConfiguration::getDefaultHead return m_DefaultHeaders; } +const std::map& ApiConfiguration::getDefaultHeaders() const +{ + return m_DefaultHeaders; +} + utility::string_t ApiConfiguration::getApiKey( const utility::string_t& prefix) const { auto result = m_ApiKeys.find(prefix); diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h index 45b5145ab79..232ffbf77d7 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -35,7 +35,7 @@ public: ApiConfiguration(); virtual ~ApiConfiguration(); - web::http::client::http_client_config& getHttpConfig(); + const web::http::client::http_client_config& getHttpConfig() const; void setHttpConfig( web::http::client::http_client_config& value ); utility::string_t getBaseUrl() const; @@ -45,6 +45,7 @@ public: void setUserAgent( const utility::string_t value ); std::map& getDefaultHeaders(); + const std::map& getDefaultHeaders() const; utility::string_t getApiKey( const utility::string_t& prefix) const; void setApiKey( const utility::string_t& prefix, const utility::string_t& apiKey ); diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp index aae7fcd050c..cb9857d1a66 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.h b/samples/client/petstore/cpp-restsdk/client/ApiException.h index 8be47599399..6415d664499 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiException.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp index 7664053f202..f7b6ac6e55b 100644 --- a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.h b/samples/client/petstore/cpp-restsdk/client/HttpContent.h index 2024da6764e..0a3fcd1cf2a 100644 --- a/samples/client/petstore/cpp-restsdk/client/HttpContent.h +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h index 4bcd03e1006..771253a0afb 100644 --- a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h +++ b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp index 19e60971c57..e25ec322e01 100644 --- a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.h b/samples/client/petstore/cpp-restsdk/client/JsonBody.h index f8011a08da6..19010c9792c 100644 --- a/samples/client/petstore/cpp-restsdk/client/JsonBody.h +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp index 940b9884d23..390dcece5dd 100644 --- a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.h b/samples/client/petstore/cpp-restsdk/client/ModelBase.h index 91eed9bc776..f322d9dd853 100644 --- a/samples/client/petstore/cpp-restsdk/client/ModelBase.h +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp index d38042f15cb..e590dff2949 100644 --- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h index e94e4487953..7c1b20557c7 100644 --- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/Object.cpp b/samples/client/petstore/cpp-restsdk/client/Object.cpp index d148cb427e8..3504a373de6 100644 --- a/samples/client/petstore/cpp-restsdk/client/Object.cpp +++ b/samples/client/petstore/cpp-restsdk/client/Object.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/Object.h b/samples/client/petstore/cpp-restsdk/client/Object.h index 191d17e2cc7..06f5838eec1 100644 --- a/samples/client/petstore/cpp-restsdk/client/Object.h +++ b/samples/client/petstore/cpp-restsdk/client/Object.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp index c5c68011d17..05aae4abf11 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -26,7 +26,7 @@ namespace api { using namespace org::openapitools::client::model; -PetApi::PetApi( std::shared_ptr apiClient ) +PetApi::PetApi( std::shared_ptr apiClient ) : m_ApiClient(apiClient) { } @@ -35,7 +35,7 @@ PetApi::~PetApi() { } -pplx::task PetApi::addPet(std::shared_ptr body) +pplx::task PetApi::addPet(std::shared_ptr body) const { // verify the required parameter 'body' is set @@ -45,7 +45,7 @@ pplx::task PetApi::addPet(std::shared_ptr body) } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/pet"); std::map localVarQueryParams; @@ -159,11 +159,11 @@ pplx::task PetApi::addPet(std::shared_ptr body) return void(); }); } -pplx::task PetApi::deletePet(int64_t petId, boost::optional apiKey) +pplx::task PetApi::deletePet(int64_t petId, boost::optional apiKey) const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/pet/{petId}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("petId") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(petId)); @@ -265,11 +265,11 @@ pplx::task PetApi::deletePet(int64_t petId, boost::optional>> PetApi::findPetsByStatus(std::vector status) +pplx::task>> PetApi::findPetsByStatus(std::vector status) const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/pet/findByStatus"); std::map localVarQueryParams; @@ -396,11 +396,11 @@ pplx::task>> PetApi::findPetsByStatus(std::vect return localVarResult; }); } -pplx::task>> PetApi::findPetsByTags(std::vector tags) +pplx::task>> PetApi::findPetsByTags(std::vector tags) const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/pet/findByTags"); std::map localVarQueryParams; @@ -527,11 +527,11 @@ pplx::task>> PetApi::findPetsByTags(std::vector return localVarResult; }); } -pplx::task> PetApi::getPetById(int64_t petId) +pplx::task> PetApi::getPetById(int64_t petId) const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/pet/{petId}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("petId") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(petId)); @@ -655,7 +655,7 @@ pplx::task> PetApi::getPetById(int64_t petId) return localVarResult; }); } -pplx::task PetApi::updatePet(std::shared_ptr body) +pplx::task PetApi::updatePet(std::shared_ptr body) const { // verify the required parameter 'body' is set @@ -665,7 +665,7 @@ pplx::task PetApi::updatePet(std::shared_ptr body) } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/pet"); std::map localVarQueryParams; @@ -779,11 +779,11 @@ pplx::task PetApi::updatePet(std::shared_ptr body) return void(); }); } -pplx::task PetApi::updatePetWithForm(int64_t petId, boost::optional name, boost::optional status) +pplx::task PetApi::updatePetWithForm(int64_t petId, boost::optional name, boost::optional status) const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/pet/{petId}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("petId") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(petId)); @@ -890,11 +890,11 @@ pplx::task PetApi::updatePetWithForm(int64_t petId, boost::optional> PetApi::uploadFile(int64_t petId, boost::optional additionalMetadata, boost::optional> file) +pplx::task> PetApi::uploadFile(int64_t petId, boost::optional additionalMetadata, boost::optional> file) const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/pet/{petId}/uploadImage"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("petId") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(petId)); diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h index 422ad2afee8..24223f369c3 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -42,7 +42,7 @@ class PetApi { public: - explicit PetApi( std::shared_ptr apiClient ); + explicit PetApi( std::shared_ptr apiClient ); virtual ~PetApi(); @@ -55,7 +55,7 @@ public: /// Pet object that needs to be added to the store pplx::task addPet( std::shared_ptr body - ); + ) const; /// /// Deletes a pet /// @@ -67,7 +67,7 @@ public: pplx::task deletePet( int64_t petId, boost::optional apiKey - ); + ) const; /// /// Finds Pets by status /// @@ -77,7 +77,7 @@ public: /// Status values that need to be considered for filter pplx::task>> findPetsByStatus( std::vector status - ); + ) const; /// /// Finds Pets by tags /// @@ -87,7 +87,7 @@ public: /// Tags to filter by pplx::task>> findPetsByTags( std::vector tags - ); + ) const; /// /// Find pet by ID /// @@ -97,7 +97,7 @@ public: /// ID of pet to return pplx::task> getPetById( int64_t petId - ); + ) const; /// /// Update an existing pet /// @@ -107,7 +107,7 @@ public: /// Pet object that needs to be added to the store pplx::task updatePet( std::shared_ptr body - ); + ) const; /// /// Updates a pet in the store with form data /// @@ -121,7 +121,7 @@ public: int64_t petId, boost::optional name, boost::optional status - ); + ) const; /// /// uploads an image /// @@ -135,10 +135,10 @@ public: int64_t petId, boost::optional additionalMetadata, boost::optional> file - ); + ) const; protected: - std::shared_ptr m_ApiClient; + std::shared_ptr m_ApiClient; }; } diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp index a1651f3a160..47a281f656d 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -26,7 +26,7 @@ namespace api { using namespace org::openapitools::client::model; -StoreApi::StoreApi( std::shared_ptr apiClient ) +StoreApi::StoreApi( std::shared_ptr apiClient ) : m_ApiClient(apiClient) { } @@ -35,11 +35,11 @@ StoreApi::~StoreApi() { } -pplx::task StoreApi::deleteOrder(utility::string_t orderId) +pplx::task StoreApi::deleteOrder(utility::string_t orderId) const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/store/order/{orderId}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("orderId") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(orderId)); @@ -135,11 +135,11 @@ pplx::task StoreApi::deleteOrder(utility::string_t orderId) return void(); }); } -pplx::task> StoreApi::getInventory() +pplx::task> StoreApi::getInventory() const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/store/inventory"); std::map localVarQueryParams; @@ -266,11 +266,11 @@ pplx::task> StoreApi::getInventory() return localVarResult; }); } -pplx::task> StoreApi::getOrderById(int64_t orderId) +pplx::task> StoreApi::getOrderById(int64_t orderId) const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/store/order/{orderId}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("orderId") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(orderId)); @@ -386,7 +386,7 @@ pplx::task> StoreApi::getOrderById(int64_t orderId) return localVarResult; }); } -pplx::task> StoreApi::placeOrder(std::shared_ptr body) +pplx::task> StoreApi::placeOrder(std::shared_ptr body) const { // verify the required parameter 'body' is set @@ -396,7 +396,7 @@ pplx::task> StoreApi::placeOrder(std::shared_ptr b } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/store/order"); std::map localVarQueryParams; diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h index a13033db76a..5d39027c629 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -41,7 +41,7 @@ class StoreApi { public: - explicit StoreApi( std::shared_ptr apiClient ); + explicit StoreApi( std::shared_ptr apiClient ); virtual ~StoreApi(); @@ -54,7 +54,7 @@ public: /// ID of the order that needs to be deleted pplx::task deleteOrder( utility::string_t orderId - ); + ) const; /// /// Returns pet inventories by status /// @@ -62,7 +62,7 @@ public: /// Returns a map of status codes to quantities /// pplx::task> getInventory( - ); + ) const; /// /// Find purchase order by ID /// @@ -72,7 +72,7 @@ public: /// ID of pet that needs to be fetched pplx::task> getOrderById( int64_t orderId - ); + ) const; /// /// Place an order for a pet /// @@ -82,10 +82,10 @@ public: /// order placed for purchasing the pet pplx::task> placeOrder( std::shared_ptr body - ); + ) const; protected: - std::shared_ptr m_ApiClient; + std::shared_ptr m_ApiClient; }; } diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp index ac5933dde09..690ef145d1a 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -26,7 +26,7 @@ namespace api { using namespace org::openapitools::client::model; -UserApi::UserApi( std::shared_ptr apiClient ) +UserApi::UserApi( std::shared_ptr apiClient ) : m_ApiClient(apiClient) { } @@ -35,7 +35,7 @@ UserApi::~UserApi() { } -pplx::task UserApi::createUser(std::shared_ptr body) +pplx::task UserApi::createUser(std::shared_ptr body) const { // verify the required parameter 'body' is set @@ -45,7 +45,7 @@ pplx::task UserApi::createUser(std::shared_ptr body) } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/user"); std::map localVarQueryParams; @@ -155,11 +155,11 @@ pplx::task UserApi::createUser(std::shared_ptr body) return void(); }); } -pplx::task UserApi::createUsersWithArrayInput(std::vector> body) +pplx::task UserApi::createUsersWithArrayInput(std::vector> body) const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/user/createWithArray"); std::map localVarQueryParams; @@ -280,11 +280,11 @@ pplx::task UserApi::createUsersWithArrayInput(std::vector UserApi::createUsersWithListInput(std::vector> body) +pplx::task UserApi::createUsersWithListInput(std::vector> body) const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/user/createWithList"); std::map localVarQueryParams; @@ -405,11 +405,11 @@ pplx::task UserApi::createUsersWithListInput(std::vector UserApi::deleteUser(utility::string_t username) +pplx::task UserApi::deleteUser(utility::string_t username) const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/user/{username}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("username") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(username)); @@ -505,11 +505,11 @@ pplx::task UserApi::deleteUser(utility::string_t username) return void(); }); } -pplx::task> UserApi::getUserByName(utility::string_t username) +pplx::task> UserApi::getUserByName(utility::string_t username) const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/user/{username}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("username") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(username)); @@ -625,11 +625,11 @@ pplx::task> UserApi::getUserByName(utility::string_t usern return localVarResult; }); } -pplx::task UserApi::loginUser(utility::string_t username, utility::string_t password) +pplx::task UserApi::loginUser(utility::string_t username, utility::string_t password) const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/user/login"); std::map localVarQueryParams; @@ -760,11 +760,11 @@ pplx::task UserApi::loginUser(utility::string_t username, uti return localVarResult; }); } -pplx::task UserApi::logoutUser() +pplx::task UserApi::logoutUser() const { - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/user/logout"); std::map localVarQueryParams; @@ -859,7 +859,7 @@ pplx::task UserApi::logoutUser() return void(); }); } -pplx::task UserApi::updateUser(utility::string_t username, std::shared_ptr body) +pplx::task UserApi::updateUser(utility::string_t username, std::shared_ptr body) const { // verify the required parameter 'body' is set @@ -869,7 +869,7 @@ pplx::task UserApi::updateUser(utility::string_t username, std::shared_ptr } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/user/{username}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("username") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(username)); diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h index ede5f2937c7..2d52a8a806e 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -41,7 +41,7 @@ class UserApi { public: - explicit UserApi( std::shared_ptr apiClient ); + explicit UserApi( std::shared_ptr apiClient ); virtual ~UserApi(); @@ -54,7 +54,7 @@ public: /// Created user object pplx::task createUser( std::shared_ptr body - ); + ) const; /// /// Creates list of users with given input array /// @@ -64,7 +64,7 @@ public: /// List of user object pplx::task createUsersWithArrayInput( std::vector> body - ); + ) const; /// /// Creates list of users with given input array /// @@ -74,7 +74,7 @@ public: /// List of user object pplx::task createUsersWithListInput( std::vector> body - ); + ) const; /// /// Delete user /// @@ -84,7 +84,7 @@ public: /// The name that needs to be deleted pplx::task deleteUser( utility::string_t username - ); + ) const; /// /// Get user by user name /// @@ -94,7 +94,7 @@ public: /// The name that needs to be fetched. Use user1 for testing. pplx::task> getUserByName( utility::string_t username - ); + ) const; /// /// Logs user into the system /// @@ -106,7 +106,7 @@ public: pplx::task loginUser( utility::string_t username, utility::string_t password - ); + ) const; /// /// Logs out current logged in user session /// @@ -114,7 +114,7 @@ public: /// /// pplx::task logoutUser( - ); + ) const; /// /// Updated user /// @@ -126,10 +126,10 @@ public: pplx::task updateUser( utility::string_t username, std::shared_ptr body - ); + ) const; protected: - std::shared_ptr m_ApiClient; + std::shared_ptr m_ApiClient; }; } diff --git a/samples/client/petstore/cpp-restsdk/client/git_push.sh b/samples/client/petstore/cpp-restsdk/client/git_push.sh index 14171b3f814..ced3be2b0c7 100644 --- a/samples/client/petstore/cpp-restsdk/client/git_push.sh +++ b/samples/client/petstore/cpp-restsdk/client/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-cpprest "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,5 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp index 2fa289ebd99..0926ff9f79d 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h index 6567d7a82c8..957c1ff2a6a 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp index c181f0ba6fa..13f9673375c 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.h b/samples/client/petstore/cpp-restsdk/client/model/Category.h index d12c200ca70..7b93a138b9b 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Category.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp index 2d869abdd45..6ea42229fba 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.h b/samples/client/petstore/cpp-restsdk/client/model/Order.h index b678f43361e..6d40801ddca 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Order.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp index f82d856aaac..4985d78db5f 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -96,7 +96,7 @@ void Pet::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("category")); if(!fieldValue.is_null()) { - std::shared_ptr newItem(new Category()); + auto newItem = std::make_shared::element_type>(); newItem->fromJson(fieldValue); setCategory( newItem ); } @@ -123,7 +123,7 @@ void Pet::fromJson(const web::json::value& val) } else { - std::shared_ptr newItem(new Tag()); + auto newItem = std::make_shared::element_type>(); newItem->fromJson(item); m_Tags.push_back( newItem ); } @@ -202,7 +202,7 @@ void Pet::fromMultiPart(std::shared_ptr multipart, const util { if(multipart->hasContent(utility::conversions::to_string_t("category"))) { - std::shared_ptr newItem(new Category()); + auto newItem = std::make_shared::element_type>(); newItem->fromMultiPart(multipart, utility::conversions::to_string_t("category.")); setCategory( newItem ); } @@ -231,7 +231,7 @@ void Pet::fromMultiPart(std::shared_ptr multipart, const util } else { - std::shared_ptr newItem(new Tag()); + auto newItem = std::make_shared::element_type>(); newItem->fromJson(item); m_Tags.push_back( newItem ); } diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.h b/samples/client/petstore/cpp-restsdk/client/model/Pet.h index 5c8a9ddaedf..e33108f1769 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Pet.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp index 9b46c05f0d7..7b13e6ca4f5 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.h b/samples/client/petstore/cpp-restsdk/client/model/Tag.h index 921d17672be..5b9d769a8d1 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Tag.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.cpp b/samples/client/petstore/cpp-restsdk/client/model/User.cpp index ace766573f3..18d4b39c3b3 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/User.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/User.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.h b/samples/client/petstore/cpp-restsdk/client/model/User.h index ce0fea2d166..4b2513ce248 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/User.h +++ b/samples/client/petstore/cpp-restsdk/client/model/User.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 4.1.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.2.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */