forked from loafle/openapi-generator-original
[cpp-restsdk] fix crashes and constness (#5123)
* []c++[cpprest]fix some constness and invalid access to null entities * update petstore sample
This commit is contained in:
parent
5a5c3db938
commit
346cfc62f3
@ -35,7 +35,7 @@ public:
|
|||||||
{{#allParams}}
|
{{#allParams}}
|
||||||
{{^required}}boost::optional<{{/required}}{{#isFile}}std::shared_ptr<{{/isFile}}{{{dataType}}}{{#isFile}}>{{/isFile}}{{^required}}>{{/required}} {{paramName}}{{#hasMore}},{{/hasMore}}
|
{{^required}}boost::optional<{{/required}}{{#isFile}}std::shared_ptr<{{/isFile}}{{{dataType}}}{{#isFile}}>{{/isFile}}{{^required}}>{{/required}} {{paramName}}{{#hasMore}},{{/hasMore}}
|
||||||
{{/allParams}}
|
{{/allParams}}
|
||||||
) = 0;
|
) const = 0;
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
};{{/gmockApis}}
|
};{{/gmockApis}}
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ public:
|
|||||||
using Base = I{{classname}};
|
using Base = I{{classname}};
|
||||||
{{/gmockApis}}
|
{{/gmockApis}}
|
||||||
|
|
||||||
explicit {{classname}}( std::shared_ptr<ApiClient> apiClient );
|
explicit {{classname}}( std::shared_ptr<const ApiClient> apiClient );
|
||||||
|
|
||||||
{{#gmockApis}}
|
{{#gmockApis}}
|
||||||
~{{classname}}() override;
|
~{{classname}}() override;
|
||||||
@ -69,11 +69,11 @@ public:
|
|||||||
{{#allParams}}
|
{{#allParams}}
|
||||||
{{^required}}boost::optional<{{/required}}{{#isFile}}std::shared_ptr<{{/isFile}}{{{dataType}}}{{#isFile}}>{{/isFile}}{{^required}}>{{/required}} {{paramName}}{{#hasMore}},{{/hasMore}}
|
{{^required}}boost::optional<{{/required}}{{#isFile}}std::shared_ptr<{{/isFile}}{{{dataType}}}{{#isFile}}>{{/isFile}}{{^required}}>{{/required}} {{paramName}}{{#hasMore}},{{/hasMore}}
|
||||||
{{/allParams}}
|
{{/allParams}}
|
||||||
){{#gmockApis}} override{{/gmockApis}};
|
) const{{#gmockApis}} override{{/gmockApis}};
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::shared_ptr<ApiClient> m_ApiClient;
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
||||||
};
|
};
|
||||||
|
|
||||||
{{#apiNamespaceDeclarations}}
|
{{#apiNamespaceDeclarations}}
|
||||||
|
@ -16,7 +16,7 @@ namespace {{this}} {
|
|||||||
|
|
||||||
using namespace {{modelNamespace}};
|
using namespace {{modelNamespace}};
|
||||||
|
|
||||||
{{classname}}::{{classname}}( std::shared_ptr<ApiClient> apiClient )
|
{{classname}}::{{classname}}( std::shared_ptr<const ApiClient> apiClient )
|
||||||
: m_ApiClient(apiClient)
|
: m_ApiClient(apiClient)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -26,7 +26,7 @@ using namespace {{modelNamespace}};
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{#operation}}
|
{{#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}}
|
{{#allParams}}{{#required}}{{^isPrimitiveType}}{{^isContainer}}
|
||||||
// verify the required parameter '{{paramName}}' is set
|
// verify the required parameter '{{paramName}}' is set
|
||||||
@ -36,7 +36,7 @@ pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/r
|
|||||||
}
|
}
|
||||||
{{/isContainer}}{{/isPrimitiveType}}{{/required}}{{/allParams}}
|
{{/isContainer}}{{/isPrimitiveType}}{{/required}}{{/allParams}}
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("{{{path}}}");
|
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}}boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("{{baseName}}") + utility::conversions::to_string_t("}"), ApiClient::parameterToString({{{paramName}}}));
|
||||||
{{/pathParams}}
|
{{/pathParams}}
|
||||||
|
@ -34,7 +34,7 @@ using namespace {{modelNamespace}};
|
|||||||
class {{declspec}} ApiClient
|
class {{declspec}} ApiClient
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ApiClient( std::shared_ptr<ApiConfiguration> configuration = nullptr );
|
ApiClient( std::shared_ptr<const ApiConfiguration> configuration = nullptr );
|
||||||
virtual ~ApiClient();
|
virtual ~ApiClient();
|
||||||
|
|
||||||
typedef std::function<void(web::http::status_code, const web::http::http_headers&)> ResponseHandlerType;
|
typedef std::function<void(web::http::status_code, const web::http::http_headers&)> ResponseHandlerType;
|
||||||
@ -42,8 +42,8 @@ public:
|
|||||||
const ResponseHandlerType& getResponseHandler() const;
|
const ResponseHandlerType& getResponseHandler() const;
|
||||||
void setResponseHandler(const ResponseHandlerType& responseHandler);
|
void setResponseHandler(const ResponseHandlerType& responseHandler);
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> getConfiguration() const;
|
std::shared_ptr<const ApiConfiguration> getConfiguration() const;
|
||||||
void setConfiguration(std::shared_ptr<ApiConfiguration> configuration);
|
void setConfiguration(std::shared_ptr<const ApiConfiguration> configuration);
|
||||||
|
|
||||||
static utility::string_t parameterToString(utility::string_t value);
|
static utility::string_t parameterToString(utility::string_t value);
|
||||||
static utility::string_t parameterToString(int32_t value);
|
static utility::string_t parameterToString(int32_t value);
|
||||||
@ -70,7 +70,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
ResponseHandlerType m_ResponseHandler;
|
ResponseHandlerType m_ResponseHandler;
|
||||||
std::shared_ptr<ApiConfiguration> m_Configuration;
|
std::shared_ptr<const ApiConfiguration> m_Configuration;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
@ -21,7 +21,7 @@ namespace {{this}} {
|
|||||||
|
|
||||||
using namespace {{modelNamespace}};
|
using namespace {{modelNamespace}};
|
||||||
|
|
||||||
ApiClient::ApiClient(std::shared_ptr<ApiConfiguration> configuration )
|
ApiClient::ApiClient(std::shared_ptr<const ApiConfiguration> configuration )
|
||||||
: m_Configuration(configuration)
|
: m_Configuration(configuration)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -37,11 +37,11 @@ void ApiClient::setResponseHandler(const ResponseHandlerType& responseHandler) {
|
|||||||
m_ResponseHandler = responseHandler;
|
m_ResponseHandler = responseHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> ApiClient::getConfiguration() const
|
std::shared_ptr<const ApiConfiguration> ApiClient::getConfiguration() const
|
||||||
{
|
{
|
||||||
return m_Configuration;
|
return m_Configuration;
|
||||||
}
|
}
|
||||||
void ApiClient::setConfiguration(std::shared_ptr<ApiConfiguration> configuration)
|
void ApiClient::setConfiguration(std::shared_ptr<const ApiConfiguration> configuration)
|
||||||
{
|
{
|
||||||
m_Configuration = configuration;
|
m_Configuration = configuration;
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
|||||||
web::http::client::http_client client(m_Configuration->getBaseUrl(), m_Configuration->getHttpConfig());
|
web::http::client::http_client client(m_Configuration->getBaseUrl(), m_Configuration->getHttpConfig());
|
||||||
|
|
||||||
web::http::http_request request;
|
web::http::http_request request;
|
||||||
for ( auto& kvp : headerParams )
|
for (const auto& kvp : headerParams)
|
||||||
{
|
{
|
||||||
request.headers().add(kvp.first, kvp.second);
|
request.headers().add(kvp.first, kvp.second);
|
||||||
}
|
}
|
||||||
@ -116,18 +116,18 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
|||||||
if (fileParams.size() > 0)
|
if (fileParams.size() > 0)
|
||||||
{
|
{
|
||||||
MultipartFormData uploadData;
|
MultipartFormData uploadData;
|
||||||
for (auto& kvp : formParams)
|
for (const auto& kvp : formParams)
|
||||||
{
|
{
|
||||||
uploadData.add(ModelBase::toHttpContent(kvp.first, kvp.second));
|
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));
|
uploadData.add(ModelBase::toHttpContent(kvp.first, kvp.second));
|
||||||
}
|
}
|
||||||
std::stringstream data;
|
std::stringstream data;
|
||||||
uploadData.writeTo(data);
|
uploadData.writeTo(data);
|
||||||
auto bodyString = data.str();
|
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());
|
request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, utility::conversions::to_string_t("multipart/form-data; boundary=") + uploadData.getBoundary());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -137,7 +137,7 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
|||||||
std::stringstream data;
|
std::stringstream data;
|
||||||
postBody->writeTo(data);
|
postBody->writeTo(data);
|
||||||
auto bodyString = data.str();
|
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);
|
request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, contentType);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -157,7 +157,7 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
web::http::uri_builder formData;
|
web::http::uri_builder formData;
|
||||||
for (auto& kvp : formParams)
|
for (const auto& kvp : formParams)
|
||||||
{
|
{
|
||||||
formData.append_query(kvp.first, kvp.second);
|
formData.append_query(kvp.first, kvp.second);
|
||||||
}
|
}
|
||||||
@ -170,7 +170,7 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
|||||||
}
|
}
|
||||||
|
|
||||||
web::http::uri_builder builder(path);
|
web::http::uri_builder builder(path);
|
||||||
for (auto& kvp : queryParams)
|
for (const auto& kvp : queryParams)
|
||||||
{
|
{
|
||||||
builder.append_query(kvp.first, kvp.second);
|
builder.append_query(kvp.first, kvp.second);
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ public:
|
|||||||
ApiConfiguration();
|
ApiConfiguration();
|
||||||
virtual ~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 );
|
void setHttpConfig( web::http::client::http_client_config& value );
|
||||||
|
|
||||||
utility::string_t getBaseUrl() const;
|
utility::string_t getBaseUrl() const;
|
||||||
@ -34,6 +34,7 @@ public:
|
|||||||
void setUserAgent( const utility::string_t value );
|
void setUserAgent( const utility::string_t value );
|
||||||
|
|
||||||
std::map<utility::string_t, utility::string_t>& getDefaultHeaders();
|
std::map<utility::string_t, utility::string_t>& getDefaultHeaders();
|
||||||
|
const std::map<utility::string_t, utility::string_t>& getDefaultHeaders() const;
|
||||||
|
|
||||||
utility::string_t getApiKey( const utility::string_t& prefix) const;
|
utility::string_t getApiKey( const utility::string_t& prefix) const;
|
||||||
void setApiKey( const utility::string_t& prefix, const utility::string_t& apiKey );
|
void setApiKey( const utility::string_t& prefix, const utility::string_t& apiKey );
|
||||||
|
@ -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;
|
return m_HttpConfig;
|
||||||
}
|
}
|
||||||
@ -48,6 +48,11 @@ std::map<utility::string_t, utility::string_t>& ApiConfiguration::getDefaultHead
|
|||||||
return m_DefaultHeaders;
|
return m_DefaultHeaders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::map<utility::string_t, utility::string_t>& ApiConfiguration::getDefaultHeaders() const
|
||||||
|
{
|
||||||
|
return m_DefaultHeaders;
|
||||||
|
}
|
||||||
|
|
||||||
utility::string_t ApiConfiguration::getApiKey( const utility::string_t& prefix) const
|
utility::string_t ApiConfiguration::getApiKey( const utility::string_t& prefix) const
|
||||||
{
|
{
|
||||||
auto result = m_ApiKeys.find(prefix);
|
auto result = m_ApiKeys.find(prefix);
|
||||||
|
@ -265,7 +265,7 @@ void {{classname}}::fromJson(const web::json::value& val)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
{{{items.datatype}}} newItem({{{items.defaultValue}}});
|
auto newItem = std::make_shared<{{{items.datatype}}}::element_type>();
|
||||||
newItem->fromJson(item);
|
newItem->fromJson(item);
|
||||||
m_{{name}}.push_back( newItem );
|
m_{{name}}.push_back( newItem );
|
||||||
}
|
}
|
||||||
@ -309,7 +309,7 @@ void {{classname}}::fromJson(const web::json::value& val)
|
|||||||
}
|
}
|
||||||
else
|
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")));
|
newItem->fromJson(item.at(utility::conversions::to_string_t("value")));
|
||||||
m_{{name}}.insert(std::pair<utility::string_t,{{{items.datatype}}}>( key, newItem ));
|
m_{{name}}.insert(std::pair<utility::string_t,{{{items.datatype}}}>( key, newItem ));
|
||||||
}
|
}
|
||||||
@ -344,7 +344,7 @@ void {{classname}}::fromJson(const web::json::value& val)
|
|||||||
{{/isDateTime}}
|
{{/isDateTime}}
|
||||||
{{^isDateTime}}
|
{{^isDateTime}}
|
||||||
{{^isByteArray}}
|
{{^isByteArray}}
|
||||||
{{{dataType}}} newItem({{{defaultValue}}});
|
auto newItem = std::make_shared<{{{datatype}}}::element_type>();
|
||||||
newItem->fromJson(fieldValue);
|
newItem->fromJson(fieldValue);
|
||||||
{{setter}}( newItem );
|
{{setter}}( newItem );
|
||||||
{{/isByteArray}}
|
{{/isByteArray}}
|
||||||
@ -371,7 +371,7 @@ void {{classname}}::fromJson(const web::json::value& val)
|
|||||||
{{setter}}(ModelBase::fileFromJson(val.at(utility::conversions::to_string_t("{{baseName}}"))));
|
{{setter}}(ModelBase::fileFromJson(val.at(utility::conversions::to_string_t("{{baseName}}"))));
|
||||||
{{/vendorExtensions.x-codegen-file}}
|
{{/vendorExtensions.x-codegen-file}}
|
||||||
{{^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}}")));
|
new{{name}}->fromJson(val.at(utility::conversions::to_string_t("{{baseName}}")));
|
||||||
{{setter}}( new{{name}} );
|
{{setter}}( new{{name}} );
|
||||||
{{/vendorExtensions.x-codegen-file}}
|
{{/vendorExtensions.x-codegen-file}}
|
||||||
@ -553,7 +553,7 @@ void {{classname}}::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
{{{items.datatype}}} newItem({{{items.defaultValue}}});
|
auto newItem = std::make_shared<{{{items.datatype}}}::element_type>();
|
||||||
newItem->fromJson(item);
|
newItem->fromJson(item);
|
||||||
m_{{name}}.push_back( newItem );
|
m_{{name}}.push_back( newItem );
|
||||||
}
|
}
|
||||||
@ -600,7 +600,7 @@ void {{classname}}::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
{{{items.datatype}}} newItem({{{items.defaultValue}}});
|
auto newItem = std::make_shared<{{{items.datatype}}}::element_type>();
|
||||||
newItem->fromJson(item[utility::conversions::to_string_t("value")]);
|
newItem->fromJson(item[utility::conversions::to_string_t("value")]);
|
||||||
m_{{name}}.insert(std::pair<utility::string_t,{{{items.datatype}}}>( key, newItem ));
|
m_{{name}}.insert(std::pair<utility::string_t,{{{items.datatype}}}>( key, newItem ));
|
||||||
}
|
}
|
||||||
@ -633,7 +633,7 @@ void {{classname}}::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
|||||||
{{^isDateTime}}
|
{{^isDateTime}}
|
||||||
if(multipart->hasContent(utility::conversions::to_string_t("{{baseName}}")))
|
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}}."));
|
newItem->fromMultiPart(multipart, utility::conversions::to_string_t("{{baseName}}."));
|
||||||
{{setter}}( newItem );
|
{{setter}}( newItem );
|
||||||
}
|
}
|
||||||
@ -659,7 +659,7 @@ void {{classname}}::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
|||||||
{{setter}}(multipart->getContent(utility::conversions::to_string_t("{{baseName}}")));
|
{{setter}}(multipart->getContent(utility::conversions::to_string_t("{{baseName}}")));
|
||||||
{{/vendorExtensions.x-codegen-file}}
|
{{/vendorExtensions.x-codegen-file}}
|
||||||
{{^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}}."));
|
new{{name}}->fromMultiPart(multipart, utility::conversions::to_string_t("{{baseName}}."));
|
||||||
{{setter}}( new{{name}} );
|
{{setter}}( new{{name}} );
|
||||||
{{/vendorExtensions.x-codegen-file}}
|
{{/vendorExtensions.x-codegen-file}}
|
||||||
|
@ -1 +1 @@
|
|||||||
4.1.0-SNAPSHOT
|
4.2.3-SNAPSHOT
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
@ -32,7 +32,7 @@ namespace api {
|
|||||||
|
|
||||||
using namespace org::openapitools::client::model;
|
using namespace org::openapitools::client::model;
|
||||||
|
|
||||||
ApiClient::ApiClient(std::shared_ptr<ApiConfiguration> configuration )
|
ApiClient::ApiClient(std::shared_ptr<const ApiConfiguration> configuration )
|
||||||
: m_Configuration(configuration)
|
: m_Configuration(configuration)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -48,11 +48,11 @@ void ApiClient::setResponseHandler(const ResponseHandlerType& responseHandler) {
|
|||||||
m_ResponseHandler = responseHandler;
|
m_ResponseHandler = responseHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> ApiClient::getConfiguration() const
|
std::shared_ptr<const ApiConfiguration> ApiClient::getConfiguration() const
|
||||||
{
|
{
|
||||||
return m_Configuration;
|
return m_Configuration;
|
||||||
}
|
}
|
||||||
void ApiClient::setConfiguration(std::shared_ptr<ApiConfiguration> configuration)
|
void ApiClient::setConfiguration(std::shared_ptr<const ApiConfiguration> configuration)
|
||||||
{
|
{
|
||||||
m_Configuration = configuration;
|
m_Configuration = configuration;
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
|||||||
web::http::client::http_client client(m_Configuration->getBaseUrl(), m_Configuration->getHttpConfig());
|
web::http::client::http_client client(m_Configuration->getBaseUrl(), m_Configuration->getHttpConfig());
|
||||||
|
|
||||||
web::http::http_request request;
|
web::http::http_request request;
|
||||||
for ( auto& kvp : headerParams )
|
for (const auto& kvp : headerParams)
|
||||||
{
|
{
|
||||||
request.headers().add(kvp.first, kvp.second);
|
request.headers().add(kvp.first, kvp.second);
|
||||||
}
|
}
|
||||||
@ -127,18 +127,18 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
|||||||
if (fileParams.size() > 0)
|
if (fileParams.size() > 0)
|
||||||
{
|
{
|
||||||
MultipartFormData uploadData;
|
MultipartFormData uploadData;
|
||||||
for (auto& kvp : formParams)
|
for (const auto& kvp : formParams)
|
||||||
{
|
{
|
||||||
uploadData.add(ModelBase::toHttpContent(kvp.first, kvp.second));
|
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));
|
uploadData.add(ModelBase::toHttpContent(kvp.first, kvp.second));
|
||||||
}
|
}
|
||||||
std::stringstream data;
|
std::stringstream data;
|
||||||
uploadData.writeTo(data);
|
uploadData.writeTo(data);
|
||||||
auto bodyString = data.str();
|
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());
|
request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, utility::conversions::to_string_t("multipart/form-data; boundary=") + uploadData.getBoundary());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -148,7 +148,7 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
|||||||
std::stringstream data;
|
std::stringstream data;
|
||||||
postBody->writeTo(data);
|
postBody->writeTo(data);
|
||||||
auto bodyString = data.str();
|
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);
|
request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, contentType);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -168,7 +168,7 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
web::http::uri_builder formData;
|
web::http::uri_builder formData;
|
||||||
for (auto& kvp : formParams)
|
for (const auto& kvp : formParams)
|
||||||
{
|
{
|
||||||
formData.append_query(kvp.first, kvp.second);
|
formData.append_query(kvp.first, kvp.second);
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
|||||||
}
|
}
|
||||||
|
|
||||||
web::http::uri_builder builder(path);
|
web::http::uri_builder builder(path);
|
||||||
for (auto& kvp : queryParams)
|
for (const auto& kvp : queryParams)
|
||||||
{
|
{
|
||||||
builder.append_query(kvp.first, kvp.second);
|
builder.append_query(kvp.first, kvp.second);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
@ -45,7 +45,7 @@ using namespace org::openapitools::client::model;
|
|||||||
class ApiClient
|
class ApiClient
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ApiClient( std::shared_ptr<ApiConfiguration> configuration = nullptr );
|
ApiClient( std::shared_ptr<const ApiConfiguration> configuration = nullptr );
|
||||||
virtual ~ApiClient();
|
virtual ~ApiClient();
|
||||||
|
|
||||||
typedef std::function<void(web::http::status_code, const web::http::http_headers&)> ResponseHandlerType;
|
typedef std::function<void(web::http::status_code, const web::http::http_headers&)> ResponseHandlerType;
|
||||||
@ -53,8 +53,8 @@ public:
|
|||||||
const ResponseHandlerType& getResponseHandler() const;
|
const ResponseHandlerType& getResponseHandler() const;
|
||||||
void setResponseHandler(const ResponseHandlerType& responseHandler);
|
void setResponseHandler(const ResponseHandlerType& responseHandler);
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> getConfiguration() const;
|
std::shared_ptr<const ApiConfiguration> getConfiguration() const;
|
||||||
void setConfiguration(std::shared_ptr<ApiConfiguration> configuration);
|
void setConfiguration(std::shared_ptr<const ApiConfiguration> configuration);
|
||||||
|
|
||||||
static utility::string_t parameterToString(utility::string_t value);
|
static utility::string_t parameterToString(utility::string_t value);
|
||||||
static utility::string_t parameterToString(int32_t value);
|
static utility::string_t parameterToString(int32_t value);
|
||||||
@ -81,7 +81,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
ResponseHandlerType m_ResponseHandler;
|
ResponseHandlerType m_ResponseHandler;
|
||||||
std::shared_ptr<ApiConfiguration> m_Configuration;
|
std::shared_ptr<const ApiConfiguration> m_Configuration;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* 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;
|
return m_HttpConfig;
|
||||||
}
|
}
|
||||||
@ -59,6 +59,11 @@ std::map<utility::string_t, utility::string_t>& ApiConfiguration::getDefaultHead
|
|||||||
return m_DefaultHeaders;
|
return m_DefaultHeaders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::map<utility::string_t, utility::string_t>& ApiConfiguration::getDefaultHeaders() const
|
||||||
|
{
|
||||||
|
return m_DefaultHeaders;
|
||||||
|
}
|
||||||
|
|
||||||
utility::string_t ApiConfiguration::getApiKey( const utility::string_t& prefix) const
|
utility::string_t ApiConfiguration::getApiKey( const utility::string_t& prefix) const
|
||||||
{
|
{
|
||||||
auto result = m_ApiKeys.find(prefix);
|
auto result = m_ApiKeys.find(prefix);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
@ -35,7 +35,7 @@ public:
|
|||||||
ApiConfiguration();
|
ApiConfiguration();
|
||||||
virtual ~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 );
|
void setHttpConfig( web::http::client::http_client_config& value );
|
||||||
|
|
||||||
utility::string_t getBaseUrl() const;
|
utility::string_t getBaseUrl() const;
|
||||||
@ -45,6 +45,7 @@ public:
|
|||||||
void setUserAgent( const utility::string_t value );
|
void setUserAgent( const utility::string_t value );
|
||||||
|
|
||||||
std::map<utility::string_t, utility::string_t>& getDefaultHeaders();
|
std::map<utility::string_t, utility::string_t>& getDefaultHeaders();
|
||||||
|
const std::map<utility::string_t, utility::string_t>& getDefaultHeaders() const;
|
||||||
|
|
||||||
utility::string_t getApiKey( const utility::string_t& prefix) const;
|
utility::string_t getApiKey( const utility::string_t& prefix) const;
|
||||||
void setApiKey( const utility::string_t& prefix, const utility::string_t& apiKey );
|
void setApiKey( const utility::string_t& prefix, const utility::string_t& apiKey );
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
@ -26,7 +26,7 @@ namespace api {
|
|||||||
|
|
||||||
using namespace org::openapitools::client::model;
|
using namespace org::openapitools::client::model;
|
||||||
|
|
||||||
PetApi::PetApi( std::shared_ptr<ApiClient> apiClient )
|
PetApi::PetApi( std::shared_ptr<const ApiClient> apiClient )
|
||||||
: m_ApiClient(apiClient)
|
: m_ApiClient(apiClient)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -35,7 +35,7 @@ PetApi::~PetApi()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
pplx::task<void> PetApi::addPet(std::shared_ptr<Pet> body)
|
pplx::task<void> PetApi::addPet(std::shared_ptr<Pet> body) const
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'body' is set
|
||||||
@ -45,7 +45,7 @@ pplx::task<void> PetApi::addPet(std::shared_ptr<Pet> body)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/pet");
|
utility::string_t localVarPath = utility::conversions::to_string_t("/pet");
|
||||||
|
|
||||||
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
||||||
@ -159,11 +159,11 @@ pplx::task<void> PetApi::addPet(std::shared_ptr<Pet> body)
|
|||||||
return void();
|
return void();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<void> PetApi::deletePet(int64_t petId, boost::optional<utility::string_t> apiKey)
|
pplx::task<void> PetApi::deletePet(int64_t petId, boost::optional<utility::string_t> apiKey) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/pet/{petId}");
|
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));
|
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<void> PetApi::deletePet(int64_t petId, boost::optional<utility::strin
|
|||||||
return void();
|
return void();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<std::vector<std::shared_ptr<Pet>>> PetApi::findPetsByStatus(std::vector<utility::string_t> status)
|
pplx::task<std::vector<std::shared_ptr<Pet>>> PetApi::findPetsByStatus(std::vector<utility::string_t> status) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/pet/findByStatus");
|
utility::string_t localVarPath = utility::conversions::to_string_t("/pet/findByStatus");
|
||||||
|
|
||||||
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
||||||
@ -396,11 +396,11 @@ pplx::task<std::vector<std::shared_ptr<Pet>>> PetApi::findPetsByStatus(std::vect
|
|||||||
return localVarResult;
|
return localVarResult;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<std::vector<std::shared_ptr<Pet>>> PetApi::findPetsByTags(std::vector<utility::string_t> tags)
|
pplx::task<std::vector<std::shared_ptr<Pet>>> PetApi::findPetsByTags(std::vector<utility::string_t> tags) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/pet/findByTags");
|
utility::string_t localVarPath = utility::conversions::to_string_t("/pet/findByTags");
|
||||||
|
|
||||||
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
||||||
@ -527,11 +527,11 @@ pplx::task<std::vector<std::shared_ptr<Pet>>> PetApi::findPetsByTags(std::vector
|
|||||||
return localVarResult;
|
return localVarResult;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<std::shared_ptr<Pet>> PetApi::getPetById(int64_t petId)
|
pplx::task<std::shared_ptr<Pet>> PetApi::getPetById(int64_t petId) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/pet/{petId}");
|
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));
|
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<std::shared_ptr<Pet>> PetApi::getPetById(int64_t petId)
|
|||||||
return localVarResult;
|
return localVarResult;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<void> PetApi::updatePet(std::shared_ptr<Pet> body)
|
pplx::task<void> PetApi::updatePet(std::shared_ptr<Pet> body) const
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'body' is set
|
||||||
@ -665,7 +665,7 @@ pplx::task<void> PetApi::updatePet(std::shared_ptr<Pet> body)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/pet");
|
utility::string_t localVarPath = utility::conversions::to_string_t("/pet");
|
||||||
|
|
||||||
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
||||||
@ -779,11 +779,11 @@ pplx::task<void> PetApi::updatePet(std::shared_ptr<Pet> body)
|
|||||||
return void();
|
return void();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<void> PetApi::updatePetWithForm(int64_t petId, boost::optional<utility::string_t> name, boost::optional<utility::string_t> status)
|
pplx::task<void> PetApi::updatePetWithForm(int64_t petId, boost::optional<utility::string_t> name, boost::optional<utility::string_t> status) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/pet/{petId}");
|
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));
|
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<void> PetApi::updatePetWithForm(int64_t petId, boost::optional<utilit
|
|||||||
return void();
|
return void();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<std::shared_ptr<ApiResponse>> PetApi::uploadFile(int64_t petId, boost::optional<utility::string_t> additionalMetadata, boost::optional<std::shared_ptr<HttpContent>> file)
|
pplx::task<std::shared_ptr<ApiResponse>> PetApi::uploadFile(int64_t petId, boost::optional<utility::string_t> additionalMetadata, boost::optional<std::shared_ptr<HttpContent>> file) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/pet/{petId}/uploadImage");
|
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));
|
boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("petId") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(petId));
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
@ -42,7 +42,7 @@ class PetApi
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit PetApi( std::shared_ptr<ApiClient> apiClient );
|
explicit PetApi( std::shared_ptr<const ApiClient> apiClient );
|
||||||
|
|
||||||
virtual ~PetApi();
|
virtual ~PetApi();
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ public:
|
|||||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||||
pplx::task<void> addPet(
|
pplx::task<void> addPet(
|
||||||
std::shared_ptr<Pet> body
|
std::shared_ptr<Pet> body
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes a pet
|
/// Deletes a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -67,7 +67,7 @@ public:
|
|||||||
pplx::task<void> deletePet(
|
pplx::task<void> deletePet(
|
||||||
int64_t petId,
|
int64_t petId,
|
||||||
boost::optional<utility::string_t> apiKey
|
boost::optional<utility::string_t> apiKey
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Finds Pets by status
|
/// Finds Pets by status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -77,7 +77,7 @@ public:
|
|||||||
/// <param name="status">Status values that need to be considered for filter</param>
|
/// <param name="status">Status values that need to be considered for filter</param>
|
||||||
pplx::task<std::vector<std::shared_ptr<Pet>>> findPetsByStatus(
|
pplx::task<std::vector<std::shared_ptr<Pet>>> findPetsByStatus(
|
||||||
std::vector<utility::string_t> status
|
std::vector<utility::string_t> status
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Finds Pets by tags
|
/// Finds Pets by tags
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -87,7 +87,7 @@ public:
|
|||||||
/// <param name="tags">Tags to filter by</param>
|
/// <param name="tags">Tags to filter by</param>
|
||||||
pplx::task<std::vector<std::shared_ptr<Pet>>> findPetsByTags(
|
pplx::task<std::vector<std::shared_ptr<Pet>>> findPetsByTags(
|
||||||
std::vector<utility::string_t> tags
|
std::vector<utility::string_t> tags
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Find pet by ID
|
/// Find pet by ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -97,7 +97,7 @@ public:
|
|||||||
/// <param name="petId">ID of pet to return</param>
|
/// <param name="petId">ID of pet to return</param>
|
||||||
pplx::task<std::shared_ptr<Pet>> getPetById(
|
pplx::task<std::shared_ptr<Pet>> getPetById(
|
||||||
int64_t petId
|
int64_t petId
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update an existing pet
|
/// Update an existing pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -107,7 +107,7 @@ public:
|
|||||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||||
pplx::task<void> updatePet(
|
pplx::task<void> updatePet(
|
||||||
std::shared_ptr<Pet> body
|
std::shared_ptr<Pet> body
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates a pet in the store with form data
|
/// Updates a pet in the store with form data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -121,7 +121,7 @@ public:
|
|||||||
int64_t petId,
|
int64_t petId,
|
||||||
boost::optional<utility::string_t> name,
|
boost::optional<utility::string_t> name,
|
||||||
boost::optional<utility::string_t> status
|
boost::optional<utility::string_t> status
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// uploads an image
|
/// uploads an image
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -135,10 +135,10 @@ public:
|
|||||||
int64_t petId,
|
int64_t petId,
|
||||||
boost::optional<utility::string_t> additionalMetadata,
|
boost::optional<utility::string_t> additionalMetadata,
|
||||||
boost::optional<std::shared_ptr<HttpContent>> file
|
boost::optional<std::shared_ptr<HttpContent>> file
|
||||||
);
|
) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::shared_ptr<ApiClient> m_ApiClient;
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
@ -26,7 +26,7 @@ namespace api {
|
|||||||
|
|
||||||
using namespace org::openapitools::client::model;
|
using namespace org::openapitools::client::model;
|
||||||
|
|
||||||
StoreApi::StoreApi( std::shared_ptr<ApiClient> apiClient )
|
StoreApi::StoreApi( std::shared_ptr<const ApiClient> apiClient )
|
||||||
: m_ApiClient(apiClient)
|
: m_ApiClient(apiClient)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -35,11 +35,11 @@ StoreApi::~StoreApi()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
pplx::task<void> StoreApi::deleteOrder(utility::string_t orderId)
|
pplx::task<void> StoreApi::deleteOrder(utility::string_t orderId) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/store/order/{orderId}");
|
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));
|
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<void> StoreApi::deleteOrder(utility::string_t orderId)
|
|||||||
return void();
|
return void();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<std::map<utility::string_t, int32_t>> StoreApi::getInventory()
|
pplx::task<std::map<utility::string_t, int32_t>> StoreApi::getInventory() const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/store/inventory");
|
utility::string_t localVarPath = utility::conversions::to_string_t("/store/inventory");
|
||||||
|
|
||||||
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
||||||
@ -266,11 +266,11 @@ pplx::task<std::map<utility::string_t, int32_t>> StoreApi::getInventory()
|
|||||||
return localVarResult;
|
return localVarResult;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<std::shared_ptr<Order>> StoreApi::getOrderById(int64_t orderId)
|
pplx::task<std::shared_ptr<Order>> StoreApi::getOrderById(int64_t orderId) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/store/order/{orderId}");
|
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));
|
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<std::shared_ptr<Order>> StoreApi::getOrderById(int64_t orderId)
|
|||||||
return localVarResult;
|
return localVarResult;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<std::shared_ptr<Order>> StoreApi::placeOrder(std::shared_ptr<Order> body)
|
pplx::task<std::shared_ptr<Order>> StoreApi::placeOrder(std::shared_ptr<Order> body) const
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'body' is set
|
||||||
@ -396,7 +396,7 @@ pplx::task<std::shared_ptr<Order>> StoreApi::placeOrder(std::shared_ptr<Order> b
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/store/order");
|
utility::string_t localVarPath = utility::conversions::to_string_t("/store/order");
|
||||||
|
|
||||||
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
@ -41,7 +41,7 @@ class StoreApi
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit StoreApi( std::shared_ptr<ApiClient> apiClient );
|
explicit StoreApi( std::shared_ptr<const ApiClient> apiClient );
|
||||||
|
|
||||||
virtual ~StoreApi();
|
virtual ~StoreApi();
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public:
|
|||||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||||
pplx::task<void> deleteOrder(
|
pplx::task<void> deleteOrder(
|
||||||
utility::string_t orderId
|
utility::string_t orderId
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns pet inventories by status
|
/// Returns pet inventories by status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -62,7 +62,7 @@ public:
|
|||||||
/// Returns a map of status codes to quantities
|
/// Returns a map of status codes to quantities
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
pplx::task<std::map<utility::string_t, int32_t>> getInventory(
|
pplx::task<std::map<utility::string_t, int32_t>> getInventory(
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Find purchase order by ID
|
/// Find purchase order by ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -72,7 +72,7 @@ public:
|
|||||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
pplx::task<std::shared_ptr<Order>> getOrderById(
|
pplx::task<std::shared_ptr<Order>> getOrderById(
|
||||||
int64_t orderId
|
int64_t orderId
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -82,10 +82,10 @@ public:
|
|||||||
/// <param name="body">order placed for purchasing the pet</param>
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
pplx::task<std::shared_ptr<Order>> placeOrder(
|
pplx::task<std::shared_ptr<Order>> placeOrder(
|
||||||
std::shared_ptr<Order> body
|
std::shared_ptr<Order> body
|
||||||
);
|
) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::shared_ptr<ApiClient> m_ApiClient;
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
@ -26,7 +26,7 @@ namespace api {
|
|||||||
|
|
||||||
using namespace org::openapitools::client::model;
|
using namespace org::openapitools::client::model;
|
||||||
|
|
||||||
UserApi::UserApi( std::shared_ptr<ApiClient> apiClient )
|
UserApi::UserApi( std::shared_ptr<const ApiClient> apiClient )
|
||||||
: m_ApiClient(apiClient)
|
: m_ApiClient(apiClient)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -35,7 +35,7 @@ UserApi::~UserApi()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
pplx::task<void> UserApi::createUser(std::shared_ptr<User> body)
|
pplx::task<void> UserApi::createUser(std::shared_ptr<User> body) const
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'body' is set
|
||||||
@ -45,7 +45,7 @@ pplx::task<void> UserApi::createUser(std::shared_ptr<User> body)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/user");
|
utility::string_t localVarPath = utility::conversions::to_string_t("/user");
|
||||||
|
|
||||||
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
||||||
@ -155,11 +155,11 @@ pplx::task<void> UserApi::createUser(std::shared_ptr<User> body)
|
|||||||
return void();
|
return void();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<void> UserApi::createUsersWithArrayInput(std::vector<std::shared_ptr<User>> body)
|
pplx::task<void> UserApi::createUsersWithArrayInput(std::vector<std::shared_ptr<User>> body) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/user/createWithArray");
|
utility::string_t localVarPath = utility::conversions::to_string_t("/user/createWithArray");
|
||||||
|
|
||||||
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
||||||
@ -280,11 +280,11 @@ pplx::task<void> UserApi::createUsersWithArrayInput(std::vector<std::shared_ptr<
|
|||||||
return void();
|
return void();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<void> UserApi::createUsersWithListInput(std::vector<std::shared_ptr<User>> body)
|
pplx::task<void> UserApi::createUsersWithListInput(std::vector<std::shared_ptr<User>> body) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/user/createWithList");
|
utility::string_t localVarPath = utility::conversions::to_string_t("/user/createWithList");
|
||||||
|
|
||||||
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
||||||
@ -405,11 +405,11 @@ pplx::task<void> UserApi::createUsersWithListInput(std::vector<std::shared_ptr<U
|
|||||||
return void();
|
return void();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<void> UserApi::deleteUser(utility::string_t username)
|
pplx::task<void> UserApi::deleteUser(utility::string_t username) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/user/{username}");
|
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));
|
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<void> UserApi::deleteUser(utility::string_t username)
|
|||||||
return void();
|
return void();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<std::shared_ptr<User>> UserApi::getUserByName(utility::string_t username)
|
pplx::task<std::shared_ptr<User>> UserApi::getUserByName(utility::string_t username) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/user/{username}");
|
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));
|
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<std::shared_ptr<User>> UserApi::getUserByName(utility::string_t usern
|
|||||||
return localVarResult;
|
return localVarResult;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<utility::string_t> UserApi::loginUser(utility::string_t username, utility::string_t password)
|
pplx::task<utility::string_t> UserApi::loginUser(utility::string_t username, utility::string_t password) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/user/login");
|
utility::string_t localVarPath = utility::conversions::to_string_t("/user/login");
|
||||||
|
|
||||||
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
||||||
@ -760,11 +760,11 @@ pplx::task<utility::string_t> UserApi::loginUser(utility::string_t username, uti
|
|||||||
return localVarResult;
|
return localVarResult;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<void> UserApi::logoutUser()
|
pplx::task<void> UserApi::logoutUser() const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/user/logout");
|
utility::string_t localVarPath = utility::conversions::to_string_t("/user/logout");
|
||||||
|
|
||||||
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
std::map<utility::string_t, utility::string_t> localVarQueryParams;
|
||||||
@ -859,7 +859,7 @@ pplx::task<void> UserApi::logoutUser()
|
|||||||
return void();
|
return void();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<void> UserApi::updateUser(utility::string_t username, std::shared_ptr<User> body)
|
pplx::task<void> UserApi::updateUser(utility::string_t username, std::shared_ptr<User> body) const
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'body' is set
|
||||||
@ -869,7 +869,7 @@ pplx::task<void> UserApi::updateUser(utility::string_t username, std::shared_ptr
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<const ApiConfiguration> localVarApiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t localVarPath = utility::conversions::to_string_t("/user/{username}");
|
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));
|
boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("username") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(username));
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
@ -41,7 +41,7 @@ class UserApi
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit UserApi( std::shared_ptr<ApiClient> apiClient );
|
explicit UserApi( std::shared_ptr<const ApiClient> apiClient );
|
||||||
|
|
||||||
virtual ~UserApi();
|
virtual ~UserApi();
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public:
|
|||||||
/// <param name="body">Created user object</param>
|
/// <param name="body">Created user object</param>
|
||||||
pplx::task<void> createUser(
|
pplx::task<void> createUser(
|
||||||
std::shared_ptr<User> body
|
std::shared_ptr<User> body
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -64,7 +64,7 @@ public:
|
|||||||
/// <param name="body">List of user object</param>
|
/// <param name="body">List of user object</param>
|
||||||
pplx::task<void> createUsersWithArrayInput(
|
pplx::task<void> createUsersWithArrayInput(
|
||||||
std::vector<std::shared_ptr<User>> body
|
std::vector<std::shared_ptr<User>> body
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -74,7 +74,7 @@ public:
|
|||||||
/// <param name="body">List of user object</param>
|
/// <param name="body">List of user object</param>
|
||||||
pplx::task<void> createUsersWithListInput(
|
pplx::task<void> createUsersWithListInput(
|
||||||
std::vector<std::shared_ptr<User>> body
|
std::vector<std::shared_ptr<User>> body
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete user
|
/// Delete user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -84,7 +84,7 @@ public:
|
|||||||
/// <param name="username">The name that needs to be deleted</param>
|
/// <param name="username">The name that needs to be deleted</param>
|
||||||
pplx::task<void> deleteUser(
|
pplx::task<void> deleteUser(
|
||||||
utility::string_t username
|
utility::string_t username
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get user by user name
|
/// Get user by user name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -94,7 +94,7 @@ public:
|
|||||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||||
pplx::task<std::shared_ptr<User>> getUserByName(
|
pplx::task<std::shared_ptr<User>> getUserByName(
|
||||||
utility::string_t username
|
utility::string_t username
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -106,7 +106,7 @@ public:
|
|||||||
pplx::task<utility::string_t> loginUser(
|
pplx::task<utility::string_t> loginUser(
|
||||||
utility::string_t username,
|
utility::string_t username,
|
||||||
utility::string_t password
|
utility::string_t password
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logs out current logged in user session
|
/// Logs out current logged in user session
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -114,7 +114,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
pplx::task<void> logoutUser(
|
pplx::task<void> logoutUser(
|
||||||
);
|
) const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updated user
|
/// Updated user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -126,10 +126,10 @@ public:
|
|||||||
pplx::task<void> updateUser(
|
pplx::task<void> updateUser(
|
||||||
utility::string_t username,
|
utility::string_t username,
|
||||||
std::shared_ptr<User> body
|
std::shared_ptr<User> body
|
||||||
);
|
) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::shared_ptr<ApiClient> m_ApiClient;
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
# 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_user_id=$1
|
||||||
git_repo_id=$2
|
git_repo_id=$2
|
||||||
release_note=$3
|
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
|
if [ "$git_user_id" = "" ]; then
|
||||||
git_user_id="GIT_USER_ID"
|
git_user_id="GIT_USER_ID"
|
||||||
@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined
|
|||||||
|
|
||||||
if [ "$GIT_TOKEN" = "" ]; then
|
if [ "$GIT_TOKEN" = "" ]; then
|
||||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
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
|
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
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@ -47,5 +53,6 @@ fi
|
|||||||
git pull origin master
|
git pull origin master
|
||||||
|
|
||||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
# 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'
|
git push origin master 2>&1 | grep -v 'To https'
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* 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"));
|
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("category"));
|
||||||
if(!fieldValue.is_null())
|
if(!fieldValue.is_null())
|
||||||
{
|
{
|
||||||
std::shared_ptr<Category> newItem(new Category());
|
auto newItem = std::make_shared<std::shared_ptr<Category>::element_type>();
|
||||||
newItem->fromJson(fieldValue);
|
newItem->fromJson(fieldValue);
|
||||||
setCategory( newItem );
|
setCategory( newItem );
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@ void Pet::fromJson(const web::json::value& val)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::shared_ptr<Tag> newItem(new Tag());
|
auto newItem = std::make_shared<std::shared_ptr<Tag>::element_type>();
|
||||||
newItem->fromJson(item);
|
newItem->fromJson(item);
|
||||||
m_Tags.push_back( newItem );
|
m_Tags.push_back( newItem );
|
||||||
}
|
}
|
||||||
@ -202,7 +202,7 @@ void Pet::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const util
|
|||||||
{
|
{
|
||||||
if(multipart->hasContent(utility::conversions::to_string_t("category")))
|
if(multipart->hasContent(utility::conversions::to_string_t("category")))
|
||||||
{
|
{
|
||||||
std::shared_ptr<Category> newItem(new Category());
|
auto newItem = std::make_shared<std::shared_ptr<Category>::element_type>();
|
||||||
newItem->fromMultiPart(multipart, utility::conversions::to_string_t("category."));
|
newItem->fromMultiPart(multipart, utility::conversions::to_string_t("category."));
|
||||||
setCategory( newItem );
|
setCategory( newItem );
|
||||||
}
|
}
|
||||||
@ -231,7 +231,7 @@ void Pet::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const util
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::shared_ptr<Tag> newItem(new Tag());
|
auto newItem = std::make_shared<std::shared_ptr<Tag>::element_type>();
|
||||||
newItem->fromJson(item);
|
newItem->fromJson(item);
|
||||||
m_Tags.push_back( newItem );
|
m_Tags.push_back( newItem );
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* 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
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user