Issue 4632 (#4803)

* Updated the Petstore samples

* This change uses std::stringstream for string conversions instead of std::to_string(). Android doesn't yet support std::to_string(). This should fix #4632
This commit is contained in:
Martin Brown
2017-04-24 10:27:51 -04:00
committed by wing328
parent 7282ad2d6a
commit fc2b3d49ea
33 changed files with 143 additions and 168 deletions

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -50,8 +50,8 @@ pplx::task<void> StoreApi::deleteOrder(utility::string_t orderId)
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
std::unordered_set<utility::string_t> responseHttpContentTypes;
responseHttpContentTypes.insert( U("application/xml") );
responseHttpContentTypes.insert( U("application/json") );
responseHttpContentTypes.insert( U("application/xml") );
utility::string_t responseHttpContentType;
@@ -150,6 +150,7 @@ pplx::task<std::map<utility::string_t, int32_t>> StoreApi::getInventory()
std::unordered_set<utility::string_t> responseHttpContentTypes;
responseHttpContentTypes.insert( U("application/json") );
responseHttpContentTypes.insert( U("application/xml") );
utility::string_t responseHttpContentType;
@@ -265,7 +266,7 @@ pplx::task<std::map<utility::string_t, int32_t>> StoreApi::getInventory()
return result;
});
}
pplx::task<std::shared_ptr<Order>> StoreApi::getOrderById(int64_t orderId)
pplx::task<std::shared_ptr<Order>> StoreApi::getOrderById(utility::string_t orderId)
{
@@ -279,8 +280,8 @@ pplx::task<std::shared_ptr<Order>> StoreApi::getOrderById(int64_t orderId)
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
std::unordered_set<utility::string_t> responseHttpContentTypes;
responseHttpContentTypes.insert( U("application/xml") );
responseHttpContentTypes.insert( U("application/json") );
responseHttpContentTypes.insert( U("application/xml") );
utility::string_t responseHttpContentType;
@@ -386,12 +387,6 @@ pplx::task<std::shared_ptr<Order>> StoreApi::getOrderById(int64_t orderId)
pplx::task<std::shared_ptr<Order>> StoreApi::placeOrder(std::shared_ptr<Order> body)
{
// verify the required parameter 'body' is set
if (body == nullptr)
{
throw ApiException(400, U("Missing required parameter 'body' when calling StoreApi->placeOrder"));
}
std::shared_ptr<ApiConfiguration> apiConfiguration( m_ApiClient->getConfiguration() );
utility::string_t path = U("/store/order");
@@ -402,8 +397,8 @@ pplx::task<std::shared_ptr<Order>> StoreApi::placeOrder(std::shared_ptr<Order> b
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
std::unordered_set<utility::string_t> responseHttpContentTypes;
responseHttpContentTypes.insert( U("application/xml") );
responseHttpContentTypes.insert( U("application/json") );
responseHttpContentTypes.insert( U("application/xml") );
utility::string_t responseHttpContentType;