mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
[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);
|
||||
template<class T>
|
||||
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(
|
||||
const utility::string_t& path,
|
||||
@ -81,6 +83,13 @@ utility::string_t ApiClient::parameterToString(const std::vector<T>& value)
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
utility::string_t ApiClient::parameterToString(const std::shared_ptr<T>& value)
|
||||
{
|
||||
return parameterToString(*value.get());
|
||||
}
|
||||
|
||||
|
||||
{{#apiNamespaceDeclarations}}
|
||||
}
|
||||
{{/apiNamespaceDeclarations}}
|
||||
|
@ -60,6 +60,8 @@ public:
|
||||
static utility::string_t parameterToString(const utility::datetime &value);
|
||||
template<class T>
|
||||
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(
|
||||
const utility::string_t& path,
|
||||
@ -92,6 +94,13 @@ utility::string_t ApiClient::parameterToString(const std::vector<T>& value)
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
utility::string_t ApiClient::parameterToString(const std::shared_ptr<T>& value)
|
||||
{
|
||||
return parameterToString(*value.get());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user