diff --git a/README.md b/README.md index c5f769ccbbc..f75aa258941 100644 --- a/README.md +++ b/README.md @@ -753,6 +753,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you - [Cachet Financial](http://www.cachetfinancial.com/) - [CloudBoost](https://www.CloudBoost.io/) - [Conplement](http://www.conplement.de/) +- [Cummins] (http://www.cummins.com/) - [Cupix](http://www.cupix.com) - [DBBest Technologies](https://www.dbbest.com) - [DecentFoX](http://decentfox.com/) diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CppRestClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CppRestClientCodegen.java index c6715b22fb2..4c7cc7c1f0b 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CppRestClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CppRestClientCodegen.java @@ -217,6 +217,10 @@ public class CppRestClientCodegen extends DefaultCodegen implements CodegenConfi if (methodResponse.getSchema() != null) { CodegenProperty cm = fromProperty("response", methodResponse.getSchema()); op.vendorExtensions.put("x-codegen-response", cm); + if(cm.datatype == "HttpContent") + { + op.vendorExtensions.put("x-codegen-response-ishttpcontent", true); + } } } } @@ -267,7 +271,8 @@ public class CppRestClientCodegen extends DefaultCodegen implements CodegenConfi Property inner = mp.getAdditionalProperties(); return getSwaggerType(p) + ""; } - if (p instanceof StringProperty || p instanceof DateProperty || p instanceof DateTimeProperty + if (p instanceof StringProperty || p instanceof DateProperty + || p instanceof DateTimeProperty || p instanceof FileProperty || languageSpecificPrimitives.contains(swaggerType)) { return toModelName(swaggerType); } @@ -289,7 +294,7 @@ public class CppRestClientCodegen extends DefaultCodegen implements CodegenConfi return "0.0"; } else if (p instanceof FloatProperty) { return "0.0f"; - } else if (p instanceof IntegerProperty) { + } else if (p instanceof IntegerProperty || p instanceof BaseIntegerProperty) { return "0"; } else if (p instanceof LongProperty) { return "0L"; diff --git a/modules/swagger-codegen/src/main/resources/cpprest/api-source.mustache b/modules/swagger-codegen/src/main/resources/cpprest/api-source.mustache index b6312e37a7f..21c5eff5553 100644 --- a/modules/swagger-codegen/src/main/resources/cpprest/api-source.mustache +++ b/modules/swagger-codegen/src/main/resources/cpprest/api-source.mustache @@ -62,10 +62,19 @@ pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/r { responseHttpContentType = U("multipart/form-data"); } + {{#vendorExtensions.x-codegen-response-ishttpcontent}} + else + { + //It's going to be binary, so just use the first one. + responseHttpContentType = *responseHttpContentTypes.begin(); + } + {{/vendorExtensions.x-codegen-response-ishttpcontent}} + {{^vendorExtensions.x-codegen-response-ishttpcontent}} else { throw ApiException(400, U("{{classname}}->{{operationId}} does not produce any supported media type")); } + {{/vendorExtensions.x-codegen-response-ishttpcontent}} headerParams[U("Accept")] = responseHttpContentType; @@ -189,17 +198,17 @@ pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/r return m_ApiClient->callApi(path, U("{{httpMethod}}"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) .then([=](web::http::http_response response) { - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (response.status_code() >= 400) - { - throw ApiException(response.status_code() - , U("error calling {{operationId}}: ") + response.reason_phrase() - , std::make_shared(response.extract_utf8string(true).get())); - } + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (response.status_code() >= 400) + { + throw ApiException(response.status_code() + , U("error calling {{operationId}}: ") + response.reason_phrase() + , std::make_shared(response.extract_utf8string(true).get())); + } // check response content type if(response.headers().has(U("Content-Type"))) @@ -213,6 +222,17 @@ pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/r } } + {{#vendorExtensions.x-codegen-response-ishttpcontent}} + return response.extract_vector(); + }) + .then([=](std::vector response) + { + HttpContent result; + std::shared_ptr stream = std::make_shared(std::string(response.begin(), response.end())); + result.setData(stream); + return result; + {{/vendorExtensions.x-codegen-response-ishttpcontent}} + {{^vendorExtensions.x-codegen-response-ishttpcontent}} return response.extract_string(); }) .then([=](utility::string_t response) @@ -253,12 +273,13 @@ pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/r // } else { - throw ApiException(500 - , U("error calling findPetsByStatus: unsupported response type")); + throw ApiException(500 + , U("error calling findPetsByStatus: unsupported response type")); } return result; {{/returnType}} + {{/vendorExtensions.x-codegen-response-ishttpcontent}} }); } {{/operation}} diff --git a/modules/swagger-codegen/src/main/resources/cpprest/httpcontent-header.mustache b/modules/swagger-codegen/src/main/resources/cpprest/httpcontent-header.mustache index e79f575061f..27f53b8e0c1 100644 --- a/modules/swagger-codegen/src/main/resources/cpprest/httpcontent-header.mustache +++ b/modules/swagger-codegen/src/main/resources/cpprest/httpcontent-header.mustache @@ -40,9 +40,9 @@ public: virtual void setData( std::shared_ptr value ); virtual void writeTo( std::ostream& stream ); - + protected: - // NOTE: no utility::string_t here because those strings can only contain ascii + // NOTE: no utility::string_t here because those strings can only contain ascii utility::string_t m_ContentDisposition; utility::string_t m_Name; utility::string_t m_FileName; diff --git a/modules/swagger-codegen/src/main/resources/cpprest/model-source.mustache b/modules/swagger-codegen/src/main/resources/cpprest/model-source.mustache index a1985735d4a..26970c20d8d 100644 --- a/modules/swagger-codegen/src/main/resources/cpprest/model-source.mustache +++ b/modules/swagger-codegen/src/main/resources/cpprest/model-source.mustache @@ -29,12 +29,12 @@ web::json::value {{classname}}::toJson() const { web::json::value val = web::json::value::object(); - {{#vars}}{{#isPrimitiveType}}{{^required}}if(m_{{name}}IsSet) + {{#vars}}{{#isPrimitiveType}}{{^isListContainer}}{{^required}}if(m_{{name}}IsSet) { val[U("{{baseName}}")] = ModelBase::toJson(m_{{name}}); } {{/required}}{{#required}}val[U("{{baseName}}")] = ModelBase::toJson(m_{{name}}); - {{/required}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isListContainer}}{ + {{/required}}{{/isListContainer}}{{/isPrimitiveType}}{{#isListContainer}}{ std::vector jsonArray; for( auto& item : m_{{name}} ) { @@ -48,24 +48,24 @@ web::json::value {{classname}}::toJson() const } {{/required}} } - {{/isListContainer}}{{^isListContainer}}{{^required}}if(m_{{name}}IsSet) + {{/isListContainer}}{{^isListContainer}}{{^isPrimitiveType}}{{^required}}if(m_{{name}}IsSet) { val[U("{{baseName}}")] = ModelBase::toJson(m_{{name}}); } {{/required}}{{#required}}val[U("{{baseName}}")] = ModelBase::toJson(m_{{name}}); - {{/required}}{{/isListContainer}}{{/isPrimitiveType}}{{/vars}} + {{/required}}{{/isPrimitiveType}}{{/isListContainer}}{{/vars}} return val; } void {{classname}}::fromJson(web::json::value& val) { - {{#vars}}{{#isPrimitiveType}}{{^required}}if(val.has_field(U("{{baseName}}"))) + {{#vars}}{{#isPrimitiveType}}{{^isListContainer}}{{^required}}if(val.has_field(U("{{baseName}}"))) { {{setter}}(ModelBase::{{baseType}}FromJson(val[U("{{baseName}}")])); } {{/required}}{{#required}}{{setter}}(ModelBase::{{baseType}}FromJson(val[U("{{baseName}}")])); - {{/required}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isListContainer}}{ + {{/required}}{{/isListContainer}}{{/isPrimitiveType}}{{#isListContainer}}{ m_{{name}}.clear(); std::vector jsonArray; {{^required}}if(val.has_field(U("{{baseName}}"))) @@ -73,8 +73,8 @@ void {{classname}}::fromJson(web::json::value& val) {{/required}} for( auto& item : val[U("{{baseName}}")].as_array() ) { - {{#items.isPrimitiveType}}m_{{name}}.push_back(ModelBase::{{baseType}}FromJson(item)); - {{/items.isPrimitiveType}}{{^items.isPrimitiveType}}{{#items.isString}}m_{{name}}.push_back(ModelBase::stringFromJson(item)); + {{#isPrimitiveType}}m_{{name}}.push_back(ModelBase::{{items.baseType}}FromJson(item)); + {{/isPrimitiveType}}{{^isPrimitiveType}}{{#items.isString}}m_{{name}}.push_back(ModelBase::stringFromJson(item)); {{/items.isString}}{{^items.isString}}{{#items.isDateTime}}m_{{name}}.push_back(ModelBase::dateFromJson(item)); {{/items.isDateTime}}{{^items.isDateTime}} if(item.is_null()) @@ -87,13 +87,13 @@ void {{classname}}::fromJson(web::json::value& val) newItem->fromJson(item); m_{{name}}.push_back( newItem ); } - {{/items.isDateTime}}{{/items.isString}}{{/items.isPrimitiveType}} + {{/items.isDateTime}}{{/items.isString}}{{/isPrimitiveType}} } {{^required}} } {{/required}} } - {{/isListContainer}}{{^isListContainer}}{{^required}}if(val.has_field(U("{{baseName}}"))) + {{/isListContainer}}{{^isListContainer}}{{^isPrimitiveType}}{{^required}}if(val.has_field(U("{{baseName}}"))) { {{#isString}}{{setter}}(ModelBase::stringFromJson(val[U("{{baseName}}")])); {{/isString}}{{^isString}}{{#isDateTime}}{{setter}}(ModelBase::dateFromJson(val[U("{{baseName}}")])); @@ -111,23 +111,23 @@ void {{classname}}::fromJson(web::json::value& val) {{/vendorExtensions.x-codegen-file}}{{^vendorExtensions.x-codegen-file}}{{{datatype}}} new{{name}}({{{defaultValue}}}); new{{name}}->fromJson(val[U("{{baseName}}")]); {{setter}}( newItem ); - {{/vendorExtensions.x-codegen-file}}{{/isDateTime}}{{/isString}}{{/required}}{{/isListContainer}}{{/isPrimitiveType}}{{/vars}} + {{/vendorExtensions.x-codegen-file}}{{/isDateTime}}{{/isString}}{{/required}}{{/isPrimitiveType}}{{/isListContainer}}{{/vars}} } void {{classname}}::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix[namePrefix.size() - 1] != U('.')) - { - namePrefix += U("."); - } + if(namePrefix.size() > 0 && namePrefix[namePrefix.size() - 1] != U('.')) + { + namePrefix += U("."); + } - {{#vars}}{{#isPrimitiveType}}{{^required}}if(m_{{name}}IsSet) + {{#vars}}{{#isPrimitiveType}}{{^isListContainer}}{{^required}}if(m_{{name}}IsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + U("{{baseName}}"), m_{{name}})); } {{/required}}{{#required}}multipart->add(ModelBase::toHttpContent(namePrefix + U("{{baseName}}"), m_{{name}})); - {{/required}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isListContainer}}{ + {{/required}}{{/isListContainer}}{{/isPrimitiveType}}{{#isListContainer}}{ std::vector jsonArray; for( auto& item : m_{{name}} ) { @@ -141,7 +141,7 @@ void {{classname}}::toMultipart(std::shared_ptr multipart, co } {{/required}} } - {{/isListContainer}}{{^isListContainer}}{{^required}}if(m_{{name}}IsSet) + {{/isListContainer}}{{^isListContainer}}{{^isPrimitiveType}}{{^required}}if(m_{{name}}IsSet) { {{#isString}}multipart->add(ModelBase::toHttpContent(namePrefix + U("{{baseName}}"), m_{{name}})); {{/isString}}{{^isString}}{{#isDateTime}}multipart->add(ModelBase::toHttpContent(namePrefix + U("{{baseName}}"), m_{{name}})); @@ -155,23 +155,23 @@ void {{classname}}::toMultipart(std::shared_ptr multipart, co {{/isString}}{{^isString}}{{#isDateTime}}multipart->add(ModelBase::toHttpContent(namePrefix + U("{{baseName}}"), m_{{name}})); {{/isDateTime}}{{^isDateTime}}{{#vendorExtensions.x-codegen-file}}multipart->add(ModelBase::toHttpContent(namePrefix + U("{{baseName}}"), m_{{name}})); {{/vendorExtensions.x-codegen-file}}{{^vendorExtensions.x-codegen-file}}m_{{name}}->toMultipart(multipart, U("{{baseName}}.")); - {{/vendorExtensions.x-codegen-file}}{{/isDateTime}}{{/isString}}{{/required}}{{/isListContainer}}{{/isPrimitiveType}}{{/vars}} + {{/vendorExtensions.x-codegen-file}}{{/isDateTime}}{{/isString}}{{/required}}{{/isPrimitiveType}}{{/isListContainer}}{{/vars}} } void {{classname}}::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix[namePrefix.size() - 1] != U('.')) - { - namePrefix += U("."); - } + if(namePrefix.size() > 0 && namePrefix[namePrefix.size() - 1] != U('.')) + { + namePrefix += U("."); + } - {{#vars}}{{#isPrimitiveType}}{{^required}}if(multipart->hasContent(U("{{baseName}}"))) + {{#vars}}{{#isPrimitiveType}}{{^isListContainer}}{{^required}}if(multipart->hasContent(U("{{baseName}}"))) { {{setter}}(ModelBase::{{baseType}}FromHttpContent(multipart->getContent(U("{{baseName}}")))); } {{/required}}{{#required}}{{setter}}(ModelBase::{{baseType}}FromHttpContent(multipart->getContent(U("{{baseName}}")))); - {{/required}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isListContainer}}{ + {{/required}}{{/isListContainer}}{{/isPrimitiveType}}{{#isListContainer}}{ m_{{name}}.clear(); {{^required}}if(multipart->hasContent(U("{{baseName}}"))) { @@ -180,8 +180,8 @@ void {{classname}}::fromMultiPart(std::shared_ptr multipart, web::json::value jsonArray = web::json::value::parse(ModelBase::stringFromHttpContent(multipart->getContent(U("{{baseName}}")))); for( auto& item : jsonArray.as_array() ) { - {{#items.isPrimitiveType}}m_{{name}}.push_back(ModelBase::{{baseType}}FromJson(item)); - {{/items.isPrimitiveType}}{{^items.isPrimitiveType}}{{#items.isString}}m_{{name}}.push_back(ModelBase::stringFromJson(item)); + {{#isPrimitiveType}}m_{{name}}.push_back(ModelBase::{{items.baseType}}FromJson(item)); + {{/isPrimitiveType}}{{^isPrimitiveType}}{{#items.isString}}m_{{name}}.push_back(ModelBase::stringFromJson(item)); {{/items.isString}}{{^items.isString}}{{#items.isDateTime}}m_{{name}}.push_back(ModelBase::dateFromJson(item)); {{/items.isDateTime}}{{^items.isDateTime}} if(item.is_null()) @@ -194,13 +194,13 @@ void {{classname}}::fromMultiPart(std::shared_ptr multipart, newItem->fromJson(item); m_{{name}}.push_back( newItem ); } - {{/items.isDateTime}}{{/items.isString}}{{/items.isPrimitiveType}} + {{/items.isDateTime}}{{/items.isString}}{{/isPrimitiveType}} } {{^required}} } {{/required}} } - {{/isListContainer}}{{^isListContainer}}{{^required}}if(multipart->hasContent(U("{{baseName}}"))) + {{/isListContainer}}{{^isListContainer}}{{^isPrimitiveType}}{{^required}}if(multipart->hasContent(U("{{baseName}}"))) { {{#isString}}{{setter}}(ModelBase::stringFromHttpContent(multipart->getContent(U("{{baseName}}")))); {{/isString}}{{^isString}}{{#isDateTime}}{{setter}}(ModelBase::dateFromHttpContent(multipart->getContent(U("{{baseName}}")))); @@ -218,21 +218,21 @@ void {{classname}}::fromMultiPart(std::shared_ptr multipart, {{/vendorExtensions.x-codegen-file}}{{^vendorExtensions.x-codegen-file}}{{{datatype}}} new{{name}}({{{defaultValue}}}); new{{name}}->fromMultiPart(multipart, U("{{baseName}}.")); {{setter}}( new{{name}} ); - {{/vendorExtensions.x-codegen-file}}{{/isDateTime}}{{/isString}}{{/required}}{{/isListContainer}}{{/isPrimitiveType}}{{/vars}} + {{/vendorExtensions.x-codegen-file}}{{/isDateTime}}{{/isString}}{{/required}}{{/isPrimitiveType}}{{/isListContainer}}{{/vars}} } {{#vars}}{{^isNotContainer}}{{{datatype}}}& {{classname}}::{{getter}}() { - return m_{{name}}; + return m_{{name}}; } {{/isNotContainer}}{{#isNotContainer}}{{{datatype}}} {{classname}}::{{getter}}() const { - return m_{{name}}; + return m_{{name}}; } void {{classname}}::{{setter}}({{{datatype}}} value) { - m_{{name}} = value; + m_{{name}} = value; {{^required}}m_{{name}}IsSet = true;{{/required}} } {{/isNotContainer}} diff --git a/samples/client/petstore/cpprest/ApiClient.cpp b/samples/client/petstore/cpprest/ApiClient.cpp index 0fb3bc20301..b20eaf976b9 100644 --- a/samples/client/petstore/cpprest/ApiClient.cpp +++ b/samples/client/petstore/cpprest/ApiClient.cpp @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/ApiClient.h b/samples/client/petstore/cpprest/ApiClient.h index 54b0158eeb5..16e5ca125ae 100644 --- a/samples/client/petstore/cpprest/ApiClient.h +++ b/samples/client/petstore/cpprest/ApiClient.h @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/ApiConfiguration.cpp b/samples/client/petstore/cpprest/ApiConfiguration.cpp index 61bf1a5e16d..e85f43d848f 100644 --- a/samples/client/petstore/cpprest/ApiConfiguration.cpp +++ b/samples/client/petstore/cpprest/ApiConfiguration.cpp @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/ApiConfiguration.h b/samples/client/petstore/cpprest/ApiConfiguration.h index e9742d155fd..67cd2bf0178 100644 --- a/samples/client/petstore/cpprest/ApiConfiguration.h +++ b/samples/client/petstore/cpprest/ApiConfiguration.h @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/ApiException.cpp b/samples/client/petstore/cpprest/ApiException.cpp index 01ba891769e..8df3ce12400 100644 --- a/samples/client/petstore/cpprest/ApiException.cpp +++ b/samples/client/petstore/cpprest/ApiException.cpp @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/ApiException.h b/samples/client/petstore/cpprest/ApiException.h index beb2b5ea7e5..ef17912974d 100644 --- a/samples/client/petstore/cpprest/ApiException.h +++ b/samples/client/petstore/cpprest/ApiException.h @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/HttpContent.cpp b/samples/client/petstore/cpprest/HttpContent.cpp index a7a9b83aa59..2079be25aa4 100644 --- a/samples/client/petstore/cpprest/HttpContent.cpp +++ b/samples/client/petstore/cpprest/HttpContent.cpp @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/HttpContent.h b/samples/client/petstore/cpprest/HttpContent.h index 5db04412bd2..72545bf8ba5 100644 --- a/samples/client/petstore/cpprest/HttpContent.h +++ b/samples/client/petstore/cpprest/HttpContent.h @@ -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 http://swagger.io 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 @@ -64,7 +64,7 @@ public: virtual void setData( std::shared_ptr value ); virtual void writeTo( std::ostream& stream ); - + protected: // NOTE: no utility::string_t here because those strings can only contain ascii utility::string_t m_ContentDisposition; diff --git a/samples/client/petstore/cpprest/IHttpBody.h b/samples/client/petstore/cpprest/IHttpBody.h index 365109f3dab..80090afee4a 100644 --- a/samples/client/petstore/cpprest/IHttpBody.h +++ b/samples/client/petstore/cpprest/IHttpBody.h @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/JsonBody.cpp b/samples/client/petstore/cpprest/JsonBody.cpp index f152a1e98ed..349bd6bfb1e 100644 --- a/samples/client/petstore/cpprest/JsonBody.cpp +++ b/samples/client/petstore/cpprest/JsonBody.cpp @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/JsonBody.h b/samples/client/petstore/cpprest/JsonBody.h index 7b139826e21..382004f6db5 100644 --- a/samples/client/petstore/cpprest/JsonBody.h +++ b/samples/client/petstore/cpprest/JsonBody.h @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/ModelBase.cpp b/samples/client/petstore/cpprest/ModelBase.cpp index 566d82657bf..c8b64e27ea1 100644 --- a/samples/client/petstore/cpprest/ModelBase.cpp +++ b/samples/client/petstore/cpprest/ModelBase.cpp @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/ModelBase.h b/samples/client/petstore/cpprest/ModelBase.h index 8386a4ac97b..8514ec1ba8a 100644 --- a/samples/client/petstore/cpprest/ModelBase.h +++ b/samples/client/petstore/cpprest/ModelBase.h @@ -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 http://swagger.io 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 @@ -64,7 +64,7 @@ public: static web::json::value toJson( int32_t value ); static web::json::value toJson( int64_t value ); static web::json::value toJson( double value ); - + static int64_t int64_tFromJson(web::json::value& val); static int32_t int32_tFromJson(web::json::value& val); static utility::string_t stringFromJson(web::json::value& val); diff --git a/samples/client/petstore/cpprest/MultipartFormData.cpp b/samples/client/petstore/cpprest/MultipartFormData.cpp index 9fffdf22b02..ca4ca814ff5 100644 --- a/samples/client/petstore/cpprest/MultipartFormData.cpp +++ b/samples/client/petstore/cpprest/MultipartFormData.cpp @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/MultipartFormData.h b/samples/client/petstore/cpprest/MultipartFormData.h index 8fcd71ed011..01c1e7c0e8a 100644 --- a/samples/client/petstore/cpprest/MultipartFormData.h +++ b/samples/client/petstore/cpprest/MultipartFormData.h @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/api/PetApi.cpp b/samples/client/petstore/cpprest/api/PetApi.cpp index e573b9a08a6..9da8a514ef7 100644 --- a/samples/client/petstore/cpprest/api/PetApi.cpp +++ b/samples/client/petstore/cpprest/api/PetApi.cpp @@ -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 http://swagger.io 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 @@ -51,12 +51,6 @@ PetApi::~PetApi() pplx::task PetApi::addPet(std::shared_ptr body) { - // verify the required parameter 'body' is set - if (body == nullptr) - { - throw ApiException(400, U("Missing required parameter 'body' when calling PetApi->addPet")); - } - std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t path = U("/pet"); @@ -67,8 +61,8 @@ pplx::task PetApi::addPet(std::shared_ptr body) std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -82,7 +76,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("PetApi->addPet does not produce any supported media type")); } @@ -150,7 +144,7 @@ consumeHttpContentTypes.insert( U("application/xml") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -161,8 +155,8 @@ consumeHttpContentTypes.insert( U("application/xml") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -183,8 +177,8 @@ pplx::task PetApi::deletePet(int64_t petId, utility::string_t apiKey) std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -198,7 +192,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("PetApi->deletePet does not produce any supported media type")); } @@ -256,7 +250,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -267,8 +261,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -288,8 +282,8 @@ pplx::task>> PetApi::findPetsByStatus(std::vect std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -303,7 +297,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("PetApi->findPetsByStatus does not produce any supported media type")); } @@ -357,7 +351,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -368,8 +362,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -415,8 +409,8 @@ pplx::task>> PetApi::findPetsByTags(std::vector std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -430,7 +424,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("PetApi->findPetsByTags does not produce any supported media type")); } @@ -484,7 +478,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -495,8 +489,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -543,8 +537,8 @@ pplx::task> PetApi::getPetById(int64_t petId) std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -558,7 +552,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("PetApi->getPetById does not produce any supported media type")); } @@ -593,6 +587,8 @@ responseHttpContentTypes.insert( U("application/json") ); throw ApiException(415, U("PetApi->getPetById does not consume any supported media type")); } + // authentication (petstore_auth) required + // oauth2 authentication is added automatically as part of the http_client_config // authentication (api_key) required { utility::string_t apiKey = apiConfiguration->getApiKey(U("api_key")); @@ -617,7 +613,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -628,8 +624,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -657,12 +653,6 @@ responseHttpContentTypes.insert( U("application/json") ); pplx::task PetApi::updatePet(std::shared_ptr body) { - // verify the required parameter 'body' is set - if (body == nullptr) - { - throw ApiException(400, U("Missing required parameter 'body' when calling PetApi->updatePet")); - } - std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t path = U("/pet"); @@ -673,8 +663,8 @@ pplx::task PetApi::updatePet(std::shared_ptr body) std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -688,7 +678,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("PetApi->updatePet does not produce any supported media type")); } @@ -756,7 +746,7 @@ consumeHttpContentTypes.insert( U("application/xml") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -767,15 +757,15 @@ consumeHttpContentTypes.insert( U("application/xml") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { return void(); }); } -pplx::task PetApi::updatePetWithForm(int64_t petId, utility::string_t name, utility::string_t status) +pplx::task PetApi::updatePetWithForm(utility::string_t petId, utility::string_t name, utility::string_t status) { @@ -789,8 +779,8 @@ pplx::task PetApi::updatePetWithForm(int64_t petId, utility::string_t name std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -804,7 +794,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("PetApi->updatePetWithForm does not produce any supported media type")); } @@ -868,7 +858,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -879,15 +869,15 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { return void(); }); } -pplx::task> PetApi::uploadFile(int64_t petId, utility::string_t additionalMetadata, std::shared_ptr file) +pplx::task PetApi::uploadFile(int64_t petId, utility::string_t additionalMetadata, std::shared_ptr file) { @@ -902,6 +892,7 @@ pplx::task> PetApi::uploadFile(int64_t petId, utili std::unordered_set responseHttpContentTypes; responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -915,7 +906,7 @@ pplx::task> PetApi::uploadFile(int64_t petId, utili { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("PetApi->uploadFile does not produce any supported media type")); } @@ -979,7 +970,7 @@ pplx::task> PetApi::uploadFile(int64_t petId, utili , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -990,31 +981,13 @@ pplx::task> PetApi::uploadFile(int64_t petId, utili , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { - std::shared_ptr result(new ApiResponse()); - - if(responseHttpContentType == U("application/json")) - { - web::json::value json = web::json::value::parse(response); - - result->fromJson(json); - } - // else if(responseHttpContentType == U("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , U("error calling findPetsByStatus: unsupported response type")); - } - - return result; - }); + return void(); + }); } } diff --git a/samples/client/petstore/cpprest/api/PetApi.h b/samples/client/petstore/cpprest/api/PetApi.h index 0ee2bf64fe3..e3d1b40a3a8 100644 --- a/samples/client/petstore/cpprest/api/PetApi.h +++ b/samples/client/petstore/cpprest/api/PetApi.h @@ -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 http://swagger.io 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 @@ -36,7 +36,6 @@ #include "Pet.h" #include -#include "ApiResponse.h" #include "HttpContent.h" namespace io { @@ -57,7 +56,7 @@ public: /// /// /// - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store (optional) pplx::task addPet(std::shared_ptr body); /// /// Deletes a pet @@ -73,7 +72,7 @@ public: /// /// Multiple status values can be provided with comma separated strings /// - /// Status values that need to be considered for filter + /// Status values that need to be considered for filter (optional, default to available) pplx::task>> findPetsByStatus(std::vector status); /// /// Finds Pets by tags @@ -81,15 +80,15 @@ public: /// /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. /// - /// Tags to filter by + /// Tags to filter by (optional) pplx::task>> findPetsByTags(std::vector tags); /// /// Find pet by ID /// /// - /// Returns a single pet + /// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions /// - /// ID of pet to return + /// ID of pet that needs to be fetched pplx::task> getPetById(int64_t petId); /// /// Update an existing pet @@ -97,7 +96,7 @@ public: /// /// /// - /// Pet object that needs to be added to the store + /// Pet object that needs to be added to the store (optional) pplx::task updatePet(std::shared_ptr body); /// /// Updates a pet in the store with form data @@ -106,7 +105,7 @@ public: /// /// /// ID of pet that needs to be updated/// Updated name of the pet (optional)/// Updated status of the pet (optional) - pplx::task updatePetWithForm(int64_t petId, utility::string_t name, utility::string_t status); + pplx::task updatePetWithForm(utility::string_t petId, utility::string_t name, utility::string_t status); /// /// uploads an image /// @@ -114,7 +113,7 @@ public: /// /// /// ID of pet to update/// Additional data to pass to server (optional)/// file to upload (optional) - pplx::task> uploadFile(int64_t petId, utility::string_t additionalMetadata, std::shared_ptr file); + pplx::task uploadFile(int64_t petId, utility::string_t additionalMetadata, std::shared_ptr file); protected: std::shared_ptr m_ApiClient; diff --git a/samples/client/petstore/cpprest/api/StoreApi.cpp b/samples/client/petstore/cpprest/api/StoreApi.cpp index dae3f04a985..406e6d0a909 100644 --- a/samples/client/petstore/cpprest/api/StoreApi.cpp +++ b/samples/client/petstore/cpprest/api/StoreApi.cpp @@ -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 http://swagger.io 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 @@ -62,8 +62,8 @@ pplx::task StoreApi::deleteOrder(utility::string_t orderId) std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -77,7 +77,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("StoreApi->deleteOrder does not produce any supported media type")); } @@ -128,7 +128,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -139,8 +139,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -161,6 +161,7 @@ pplx::task> StoreApi::getInventory() std::unordered_set responseHttpContentTypes; responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -174,7 +175,7 @@ pplx::task> StoreApi::getInventory() { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("StoreApi->getInventory does not produce any supported media type")); } @@ -229,7 +230,7 @@ pplx::task> StoreApi::getInventory() , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -240,8 +241,8 @@ pplx::task> StoreApi::getInventory() , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -272,7 +273,7 @@ pplx::task> StoreApi::getInventory() return result; }); } -pplx::task> StoreApi::getOrderById(int64_t orderId) +pplx::task> StoreApi::getOrderById(utility::string_t orderId) { @@ -286,8 +287,8 @@ pplx::task> StoreApi::getOrderById(int64_t orderId) std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -301,7 +302,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("StoreApi->getOrderById does not produce any supported media type")); } @@ -352,7 +353,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -363,8 +364,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -392,12 +393,6 @@ responseHttpContentTypes.insert( U("application/json") ); pplx::task> StoreApi::placeOrder(std::shared_ptr 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( m_ApiClient->getConfiguration() ); utility::string_t path = U("/store/order"); @@ -408,8 +403,8 @@ pplx::task> StoreApi::placeOrder(std::shared_ptr b std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -423,7 +418,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("StoreApi->placeOrder does not produce any supported media type")); } @@ -487,7 +482,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -498,8 +493,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { diff --git a/samples/client/petstore/cpprest/api/StoreApi.h b/samples/client/petstore/cpprest/api/StoreApi.h index 0b843e6e47b..e9c2ae6ca8c 100644 --- a/samples/client/petstore/cpprest/api/StoreApi.h +++ b/samples/client/petstore/cpprest/api/StoreApi.h @@ -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 http://swagger.io 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 @@ -73,14 +73,14 @@ public: /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// ID of pet that needs to be fetched - pplx::task> getOrderById(int64_t orderId); + pplx::task> getOrderById(utility::string_t orderId); /// /// Place an order for a pet /// /// /// /// - /// order placed for purchasing the pet + /// order placed for purchasing the pet (optional) pplx::task> placeOrder(std::shared_ptr body); protected: diff --git a/samples/client/petstore/cpprest/api/UserApi.cpp b/samples/client/petstore/cpprest/api/UserApi.cpp index d376311036b..8259ef6ef9b 100644 --- a/samples/client/petstore/cpprest/api/UserApi.cpp +++ b/samples/client/petstore/cpprest/api/UserApi.cpp @@ -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 http://swagger.io 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 @@ -51,12 +51,6 @@ UserApi::~UserApi() pplx::task UserApi::createUser(std::shared_ptr body) { - // verify the required parameter 'body' is set - if (body == nullptr) - { - throw ApiException(400, U("Missing required parameter 'body' when calling UserApi->createUser")); - } - std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t path = U("/user"); @@ -67,8 +61,8 @@ pplx::task UserApi::createUser(std::shared_ptr body) std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -82,7 +76,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("UserApi->createUser does not produce any supported media type")); } @@ -146,7 +140,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -157,8 +151,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -178,8 +172,8 @@ pplx::task UserApi::createUsersWithArrayInput(std::vector> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -193,7 +187,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("UserApi->createUsersWithArrayInput does not produce any supported media type")); } @@ -271,7 +265,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -282,8 +276,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -303,8 +297,8 @@ pplx::task UserApi::createUsersWithListInput(std::vector> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -318,7 +312,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("UserApi->createUsersWithListInput does not produce any supported media type")); } @@ -396,7 +390,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -407,8 +401,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -429,8 +423,8 @@ pplx::task UserApi::deleteUser(utility::string_t username) std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -444,7 +438,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("UserApi->deleteUser does not produce any supported media type")); } @@ -495,7 +489,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -506,8 +500,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -528,8 +522,8 @@ pplx::task> UserApi::getUserByName(utility::string_t usern std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -543,7 +537,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("UserApi->getUserByName does not produce any supported media type")); } @@ -594,7 +588,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -605,8 +599,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -644,8 +638,8 @@ pplx::task UserApi::loginUser(utility::string_t username, uti std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -659,7 +653,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("UserApi->loginUser does not produce any supported media type")); } @@ -716,7 +710,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -727,8 +721,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -767,8 +761,8 @@ pplx::task UserApi::logoutUser() std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -782,7 +776,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("UserApi->logoutUser does not produce any supported media type")); } @@ -829,7 +823,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -840,8 +834,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { @@ -851,12 +845,6 @@ responseHttpContentTypes.insert( U("application/json") ); pplx::task UserApi::updateUser(utility::string_t username, std::shared_ptr body) { - // verify the required parameter 'body' is set - if (body == nullptr) - { - throw ApiException(400, U("Missing required parameter 'body' when calling UserApi->updateUser")); - } - std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t path = U("/user/{username}"); @@ -868,8 +856,8 @@ pplx::task UserApi::updateUser(utility::string_t username, std::shared_ptr std::map> fileParams; std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( U("application/xml") ); -responseHttpContentTypes.insert( U("application/json") ); + responseHttpContentTypes.insert( U("application/json") ); +responseHttpContentTypes.insert( U("application/xml") ); utility::string_t responseHttpContentType; @@ -883,7 +871,7 @@ responseHttpContentTypes.insert( U("application/json") ); { responseHttpContentType = U("multipart/form-data"); } - else + else { throw ApiException(400, U("UserApi->updateUser does not produce any supported media type")); } @@ -951,7 +939,7 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } - // check response content type + // check response content type if(response.headers().has(U("Content-Type"))) { utility::string_t contentType = response.headers()[U("Content-Type")]; @@ -962,8 +950,8 @@ responseHttpContentTypes.insert( U("application/json") ); , std::make_shared(response.extract_utf8string(true).get())); } } - - return response.extract_string(); + + return response.extract_string(); }) .then([=](utility::string_t response) { diff --git a/samples/client/petstore/cpprest/api/UserApi.h b/samples/client/petstore/cpprest/api/UserApi.h index 5f6214f16ab..34425d67a77 100644 --- a/samples/client/petstore/cpprest/api/UserApi.h +++ b/samples/client/petstore/cpprest/api/UserApi.h @@ -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 http://swagger.io 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 @@ -56,7 +56,7 @@ public: /// /// This can only be done by the logged in user. /// - /// Created user object + /// Created user object (optional) pplx::task createUser(std::shared_ptr body); /// /// Creates list of users with given input array @@ -64,7 +64,7 @@ public: /// /// /// - /// List of user object + /// List of user object (optional) pplx::task createUsersWithArrayInput(std::vector> body); /// /// Creates list of users with given input array @@ -72,7 +72,7 @@ public: /// /// /// - /// List of user object + /// List of user object (optional) pplx::task createUsersWithListInput(std::vector> body); /// /// Delete user @@ -96,7 +96,7 @@ public: /// /// /// - /// The user name for login/// The password for login in clear text + /// The user name for login (optional)/// The password for login in clear text (optional) pplx::task loginUser(utility::string_t username, utility::string_t password); /// /// Logs out current logged in user session @@ -112,7 +112,7 @@ public: /// /// This can only be done by the logged in user. /// - /// name that need to be deleted/// Updated user object + /// name that need to be deleted/// Updated user object (optional) pplx::task updateUser(utility::string_t username, std::shared_ptr body); protected: diff --git a/samples/client/petstore/cpprest/model/Category.cpp b/samples/client/petstore/cpprest/model/Category.cpp index 8221b52237a..f8cb2ec6bb4 100644 --- a/samples/client/petstore/cpprest/model/Category.cpp +++ b/samples/client/petstore/cpprest/model/Category.cpp @@ -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 http://swagger.io 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 @@ -33,7 +33,7 @@ namespace model { Category::Category() { - m_Id = 0L; + m_Id = 0; m_IdIsSet = false; m_Name = U(""); m_NameIsSet = false; diff --git a/samples/client/petstore/cpprest/model/Category.h b/samples/client/petstore/cpprest/model/Category.h index 63bf2907d31..690cf8bcf43 100644 --- a/samples/client/petstore/cpprest/model/Category.h +++ b/samples/client/petstore/cpprest/model/Category.h @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/model/Order.cpp b/samples/client/petstore/cpprest/model/Order.cpp index 43105712525..0a2ffdec9fd 100644 --- a/samples/client/petstore/cpprest/model/Order.cpp +++ b/samples/client/petstore/cpprest/model/Order.cpp @@ -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 http://swagger.io 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 @@ -33,9 +33,9 @@ namespace model { Order::Order() { - m_Id = 0L; + m_Id = 0; m_IdIsSet = false; - m_PetId = 0L; + m_PetId = 0; m_PetIdIsSet = false; m_Quantity = 0; m_QuantityIsSet = false; diff --git a/samples/client/petstore/cpprest/model/Order.h b/samples/client/petstore/cpprest/model/Order.h index 4af8f83d2d8..3c8bd62568f 100644 --- a/samples/client/petstore/cpprest/model/Order.h +++ b/samples/client/petstore/cpprest/model/Order.h @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/model/Pet.cpp b/samples/client/petstore/cpprest/model/Pet.cpp index 578570305f7..3604e63659a 100644 --- a/samples/client/petstore/cpprest/model/Pet.cpp +++ b/samples/client/petstore/cpprest/model/Pet.cpp @@ -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 http://swagger.io 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 @@ -33,7 +33,7 @@ namespace model { Pet::Pet() { - m_Id = 0L; + m_Id = 0; m_IdIsSet = false; m_CategoryIsSet = false; m_Name = U(""); diff --git a/samples/client/petstore/cpprest/model/Pet.h b/samples/client/petstore/cpprest/model/Pet.h index 88a6fe19f7e..8127ed16132 100644 --- a/samples/client/petstore/cpprest/model/Pet.h +++ b/samples/client/petstore/cpprest/model/Pet.h @@ -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 http://swagger.io 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 @@ -34,10 +34,10 @@ #include "ModelBase.h" -#include "Category.h" -#include -#include #include "Tag.h" +#include +#include "Category.h" +#include namespace io { namespace swagger { diff --git a/samples/client/petstore/cpprest/model/Tag.cpp b/samples/client/petstore/cpprest/model/Tag.cpp index 3f51e7069c9..2cb33ba48cc 100644 --- a/samples/client/petstore/cpprest/model/Tag.cpp +++ b/samples/client/petstore/cpprest/model/Tag.cpp @@ -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 http://swagger.io 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 @@ -33,7 +33,7 @@ namespace model { Tag::Tag() { - m_Id = 0L; + m_Id = 0; m_IdIsSet = false; m_Name = U(""); m_NameIsSet = false; diff --git a/samples/client/petstore/cpprest/model/Tag.h b/samples/client/petstore/cpprest/model/Tag.h index 9a9381add81..ced6bdc5c4a 100644 --- a/samples/client/petstore/cpprest/model/Tag.h +++ b/samples/client/petstore/cpprest/model/Tag.h @@ -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 http://swagger.io 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 diff --git a/samples/client/petstore/cpprest/model/User.cpp b/samples/client/petstore/cpprest/model/User.cpp index 87ebe24916a..9beb9422a40 100644 --- a/samples/client/petstore/cpprest/model/User.cpp +++ b/samples/client/petstore/cpprest/model/User.cpp @@ -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 http://swagger.io 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 @@ -33,7 +33,7 @@ namespace model { User::User() { - m_Id = 0L; + m_Id = 0; m_IdIsSet = false; m_Username = U(""); m_UsernameIsSet = false; diff --git a/samples/client/petstore/cpprest/model/User.h b/samples/client/petstore/cpprest/model/User.h index 48fdb7d60f6..8baaeaed353 100644 --- a/samples/client/petstore/cpprest/model/User.h +++ b/samples/client/petstore/cpprest/model/User.h @@ -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 http://swagger.io 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