forked from loafle/openapi-generator-original
[C++][Client][C++ Rest SDK] Fix path parameters with format (#1987)
* Create parameterToString for shared_ptr<T> * Update cpp-restsdk sample petstore client
This commit is contained in:
parent
f946492e7e
commit
cbda3fad98
@ -49,6 +49,8 @@ public:
|
|||||||
static utility::string_t parameterToString(const utility::datetime &value);
|
static utility::string_t parameterToString(const utility::datetime &value);
|
||||||
template<class T>
|
template<class T>
|
||||||
static utility::string_t parameterToString(const std::vector<T>& value);
|
static utility::string_t parameterToString(const std::vector<T>& value);
|
||||||
|
template<class T>
|
||||||
|
static utility::string_t parameterToString(const std::shared_ptr<T>& value);
|
||||||
|
|
||||||
pplx::task<web::http::http_response> callApi(
|
pplx::task<web::http::http_response> callApi(
|
||||||
const utility::string_t& path,
|
const utility::string_t& path,
|
||||||
@ -81,6 +83,13 @@ utility::string_t ApiClient::parameterToString(const std::vector<T>& value)
|
|||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
utility::string_t ApiClient::parameterToString(const std::shared_ptr<T>& value)
|
||||||
|
{
|
||||||
|
return parameterToString(*value.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
{{#apiNamespaceDeclarations}}
|
{{#apiNamespaceDeclarations}}
|
||||||
}
|
}
|
||||||
{{/apiNamespaceDeclarations}}
|
{{/apiNamespaceDeclarations}}
|
||||||
|
@ -60,6 +60,8 @@ public:
|
|||||||
static utility::string_t parameterToString(const utility::datetime &value);
|
static utility::string_t parameterToString(const utility::datetime &value);
|
||||||
template<class T>
|
template<class T>
|
||||||
static utility::string_t parameterToString(const std::vector<T>& value);
|
static utility::string_t parameterToString(const std::vector<T>& value);
|
||||||
|
template<class T>
|
||||||
|
static utility::string_t parameterToString(const std::shared_ptr<T>& value);
|
||||||
|
|
||||||
pplx::task<web::http::http_response> callApi(
|
pplx::task<web::http::http_response> callApi(
|
||||||
const utility::string_t& path,
|
const utility::string_t& path,
|
||||||
@ -92,6 +94,13 @@ utility::string_t ApiClient::parameterToString(const std::vector<T>& value)
|
|||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
utility::string_t ApiClient::parameterToString(const std::shared_ptr<T>& value)
|
||||||
|
{
|
||||||
|
return parameterToString(*value.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user