diff --git a/modules/swagger-codegen/src/main/resources/cpprest/apiclient-header.mustache b/modules/swagger-codegen/src/main/resources/cpprest/apiclient-header.mustache index 3ab4f8eced2..23bc7633171 100644 --- a/modules/swagger-codegen/src/main/resources/cpprest/apiclient-header.mustache +++ b/modules/swagger-codegen/src/main/resources/cpprest/apiclient-header.mustache @@ -39,6 +39,7 @@ public: static utility::string_t parameterToString(int32_t value); static utility::string_t parameterToString(int64_t value); static utility::string_t parameterToString(float value); + static utility::string_t parameterToString(double value); static utility::string_t parameterToString(const utility::datetime &value); template static utility::string_t parameterToString(const std::vector& value); diff --git a/modules/swagger-codegen/src/main/resources/cpprest/apiclient-source.mustache b/modules/swagger-codegen/src/main/resources/cpprest/apiclient-source.mustache index fae8c4c70b3..e5a1500c8d5 100644 --- a/modules/swagger-codegen/src/main/resources/cpprest/apiclient-source.mustache +++ b/modules/swagger-codegen/src/main/resources/cpprest/apiclient-source.mustache @@ -49,6 +49,11 @@ utility::string_t ApiClient::parameterToString(float value) return utility::conversions::to_string_t(std::to_string(value)); } +utility::string_t ApiClient::parameterToString(double value) +{ + return utility::conversions::to_string_t(std::to_string(value)); +} + utility::string_t ApiClient::parameterToString(const utility::datetime &value) { return utility::conversions::to_string_t(value.to_string(utility::datetime::ISO_8601)); diff --git a/samples/client/petstore/cpprest/ApiClient.cpp b/samples/client/petstore/cpprest/ApiClient.cpp index 346479cc1b8..5de6a5dee77 100644 --- a/samples/client/petstore/cpprest/ApiClient.cpp +++ b/samples/client/petstore/cpprest/ApiClient.cpp @@ -61,6 +61,11 @@ utility::string_t ApiClient::parameterToString(float value) return utility::conversions::to_string_t(std::to_string(value)); } +utility::string_t ApiClient::parameterToString(double value) +{ + return utility::conversions::to_string_t(std::to_string(value)); +} + utility::string_t ApiClient::parameterToString(const utility::datetime &value) { return utility::conversions::to_string_t(value.to_string(utility::datetime::ISO_8601)); diff --git a/samples/client/petstore/cpprest/ApiClient.h b/samples/client/petstore/cpprest/ApiClient.h index 1dba60fc591..b4eaadbcf02 100644 --- a/samples/client/petstore/cpprest/ApiClient.h +++ b/samples/client/petstore/cpprest/ApiClient.h @@ -51,6 +51,7 @@ public: static utility::string_t parameterToString(int32_t value); static utility::string_t parameterToString(int64_t value); static utility::string_t parameterToString(float value); + static utility::string_t parameterToString(double value); static utility::string_t parameterToString(const utility::datetime &value); template static utility::string_t parameterToString(const std::vector& value);