forked from loafle/openapi-generator-original
* Fixed errors with cpprest client generation when generating a client that uses arrays of primitive types (vector) and file responses (HttpContent). * Updated the petstore sample using script. * Removed debug code. * Removed extra newline to match master. * Fixed binary file handling in cpprest. Updated petstore samples. * Update readme to add Cummins to list * Cleaning up for pull. Removing unnecessary changes. * Fixing petstore * Fixing error in build. * Fixed error in stream copy for binary data * Replaced tab with 4 spaces in all modified files. Replaced tab with 4 spaces in all modified files.
This commit is contained in:
@@ -753,6 +753,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
|
|||||||
- [Cachet Financial](http://www.cachetfinancial.com/)
|
- [Cachet Financial](http://www.cachetfinancial.com/)
|
||||||
- [CloudBoost](https://www.CloudBoost.io/)
|
- [CloudBoost](https://www.CloudBoost.io/)
|
||||||
- [Conplement](http://www.conplement.de/)
|
- [Conplement](http://www.conplement.de/)
|
||||||
|
- [Cummins] (http://www.cummins.com/)
|
||||||
- [Cupix](http://www.cupix.com)
|
- [Cupix](http://www.cupix.com)
|
||||||
- [DBBest Technologies](https://www.dbbest.com)
|
- [DBBest Technologies](https://www.dbbest.com)
|
||||||
- [DecentFoX](http://decentfox.com/)
|
- [DecentFoX](http://decentfox.com/)
|
||||||
|
|||||||
@@ -217,6 +217,10 @@ public class CppRestClientCodegen extends DefaultCodegen implements CodegenConfi
|
|||||||
if (methodResponse.getSchema() != null) {
|
if (methodResponse.getSchema() != null) {
|
||||||
CodegenProperty cm = fromProperty("response", methodResponse.getSchema());
|
CodegenProperty cm = fromProperty("response", methodResponse.getSchema());
|
||||||
op.vendorExtensions.put("x-codegen-response", cm);
|
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();
|
Property inner = mp.getAdditionalProperties();
|
||||||
return getSwaggerType(p) + "<utility::string_t, " + getTypeDeclaration(inner) + ">";
|
return getSwaggerType(p) + "<utility::string_t, " + getTypeDeclaration(inner) + ">";
|
||||||
}
|
}
|
||||||
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)) {
|
|| languageSpecificPrimitives.contains(swaggerType)) {
|
||||||
return toModelName(swaggerType);
|
return toModelName(swaggerType);
|
||||||
}
|
}
|
||||||
@@ -289,7 +294,7 @@ public class CppRestClientCodegen extends DefaultCodegen implements CodegenConfi
|
|||||||
return "0.0";
|
return "0.0";
|
||||||
} else if (p instanceof FloatProperty) {
|
} else if (p instanceof FloatProperty) {
|
||||||
return "0.0f";
|
return "0.0f";
|
||||||
} else if (p instanceof IntegerProperty) {
|
} else if (p instanceof IntegerProperty || p instanceof BaseIntegerProperty) {
|
||||||
return "0";
|
return "0";
|
||||||
} else if (p instanceof LongProperty) {
|
} else if (p instanceof LongProperty) {
|
||||||
return "0L";
|
return "0L";
|
||||||
|
|||||||
@@ -62,10 +62,19 @@ pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/r
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
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
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("{{classname}}->{{operationId}} does not produce any supported media type"));
|
throw ApiException(400, U("{{classname}}->{{operationId}} does not produce any supported media type"));
|
||||||
}
|
}
|
||||||
|
{{/vendorExtensions.x-codegen-response-ishttpcontent}}
|
||||||
|
|
||||||
headerParams[U("Accept")] = responseHttpContentType;
|
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)
|
return m_ApiClient->callApi(path, U("{{httpMethod}}"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType)
|
||||||
.then([=](web::http::http_response response)
|
.then([=](web::http::http_response response)
|
||||||
{
|
{
|
||||||
// 1xx - informational : OK
|
// 1xx - informational : OK
|
||||||
// 2xx - successful : OK
|
// 2xx - successful : OK
|
||||||
// 3xx - redirection : OK
|
// 3xx - redirection : OK
|
||||||
// 4xx - client error : not OK
|
// 4xx - client error : not OK
|
||||||
// 5xx - client error : not OK
|
// 5xx - client error : not OK
|
||||||
if (response.status_code() >= 400)
|
if (response.status_code() >= 400)
|
||||||
{
|
{
|
||||||
throw ApiException(response.status_code()
|
throw ApiException(response.status_code()
|
||||||
, U("error calling {{operationId}}: ") + response.reason_phrase()
|
, U("error calling {{operationId}}: ") + response.reason_phrase()
|
||||||
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("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<unsigned char> response)
|
||||||
|
{
|
||||||
|
HttpContent result;
|
||||||
|
std::shared_ptr<std::stringstream> stream = std::make_shared<std::stringstream>(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();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
@@ -253,12 +273,13 @@ pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/r
|
|||||||
// }
|
// }
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(500
|
throw ApiException(500
|
||||||
, U("error calling findPetsByStatus: unsupported response type"));
|
, U("error calling findPetsByStatus: unsupported response type"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
|
{{/vendorExtensions.x-codegen-response-ishttpcontent}}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public:
|
|||||||
virtual void writeTo( std::ostream& stream );
|
virtual void writeTo( std::ostream& stream );
|
||||||
|
|
||||||
protected:
|
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_ContentDisposition;
|
||||||
utility::string_t m_Name;
|
utility::string_t m_Name;
|
||||||
utility::string_t m_FileName;
|
utility::string_t m_FileName;
|
||||||
|
|||||||
@@ -29,12 +29,12 @@ web::json::value {{classname}}::toJson() const
|
|||||||
{
|
{
|
||||||
web::json::value val = web::json::value::object();
|
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}});
|
val[U("{{baseName}}")] = ModelBase::toJson(m_{{name}});
|
||||||
}
|
}
|
||||||
{{/required}}{{#required}}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<web::json::value> jsonArray;
|
std::vector<web::json::value> jsonArray;
|
||||||
for( auto& item : m_{{name}} )
|
for( auto& item : m_{{name}} )
|
||||||
{
|
{
|
||||||
@@ -48,24 +48,24 @@ web::json::value {{classname}}::toJson() const
|
|||||||
}
|
}
|
||||||
{{/required}}
|
{{/required}}
|
||||||
}
|
}
|
||||||
{{/isListContainer}}{{^isListContainer}}{{^required}}if(m_{{name}}IsSet)
|
{{/isListContainer}}{{^isListContainer}}{{^isPrimitiveType}}{{^required}}if(m_{{name}}IsSet)
|
||||||
{
|
{
|
||||||
val[U("{{baseName}}")] = ModelBase::toJson(m_{{name}});
|
val[U("{{baseName}}")] = ModelBase::toJson(m_{{name}});
|
||||||
}
|
}
|
||||||
{{/required}}{{#required}}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;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
void {{classname}}::fromJson(web::json::value& 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}}")]));
|
{{setter}}(ModelBase::{{baseType}}FromJson(val[U("{{baseName}}")]));
|
||||||
}
|
}
|
||||||
{{/required}}{{#required}}{{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();
|
m_{{name}}.clear();
|
||||||
std::vector<web::json::value> jsonArray;
|
std::vector<web::json::value> jsonArray;
|
||||||
{{^required}}if(val.has_field(U("{{baseName}}")))
|
{{^required}}if(val.has_field(U("{{baseName}}")))
|
||||||
@@ -73,8 +73,8 @@ void {{classname}}::fromJson(web::json::value& val)
|
|||||||
{{/required}}
|
{{/required}}
|
||||||
for( auto& item : val[U("{{baseName}}")].as_array() )
|
for( auto& item : val[U("{{baseName}}")].as_array() )
|
||||||
{
|
{
|
||||||
{{#items.isPrimitiveType}}m_{{name}}.push_back(ModelBase::{{baseType}}FromJson(item));
|
{{#isPrimitiveType}}m_{{name}}.push_back(ModelBase::{{items.baseType}}FromJson(item));
|
||||||
{{/items.isPrimitiveType}}{{^items.isPrimitiveType}}{{#items.isString}}m_{{name}}.push_back(ModelBase::stringFromJson(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.isString}}{{^items.isString}}{{#items.isDateTime}}m_{{name}}.push_back(ModelBase::dateFromJson(item));
|
||||||
{{/items.isDateTime}}{{^items.isDateTime}}
|
{{/items.isDateTime}}{{^items.isDateTime}}
|
||||||
if(item.is_null())
|
if(item.is_null())
|
||||||
@@ -87,13 +87,13 @@ void {{classname}}::fromJson(web::json::value& val)
|
|||||||
newItem->fromJson(item);
|
newItem->fromJson(item);
|
||||||
m_{{name}}.push_back( newItem );
|
m_{{name}}.push_back( newItem );
|
||||||
}
|
}
|
||||||
{{/items.isDateTime}}{{/items.isString}}{{/items.isPrimitiveType}}
|
{{/items.isDateTime}}{{/items.isString}}{{/isPrimitiveType}}
|
||||||
}
|
}
|
||||||
{{^required}}
|
{{^required}}
|
||||||
}
|
}
|
||||||
{{/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}}{{setter}}(ModelBase::stringFromJson(val[U("{{baseName}}")]));
|
||||||
{{/isString}}{{^isString}}{{#isDateTime}}{{setter}}(ModelBase::dateFromJson(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}}});
|
{{/vendorExtensions.x-codegen-file}}{{^vendorExtensions.x-codegen-file}}{{{datatype}}} new{{name}}({{{defaultValue}}});
|
||||||
new{{name}}->fromJson(val[U("{{baseName}}")]);
|
new{{name}}->fromJson(val[U("{{baseName}}")]);
|
||||||
{{setter}}( newItem );
|
{{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<MultipartFormData> multipart, const utility::string_t& prefix) const
|
void {{classname}}::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||||
{
|
{
|
||||||
utility::string_t namePrefix = prefix;
|
utility::string_t namePrefix = prefix;
|
||||||
if(namePrefix.size() > 0 && namePrefix[namePrefix.size() - 1] != U('.'))
|
if(namePrefix.size() > 0 && namePrefix[namePrefix.size() - 1] != U('.'))
|
||||||
{
|
{
|
||||||
namePrefix += 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}}));
|
multipart->add(ModelBase::toHttpContent(namePrefix + U("{{baseName}}"), m_{{name}}));
|
||||||
}
|
}
|
||||||
{{/required}}{{#required}}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<web::json::value> jsonArray;
|
std::vector<web::json::value> jsonArray;
|
||||||
for( auto& item : m_{{name}} )
|
for( auto& item : m_{{name}} )
|
||||||
{
|
{
|
||||||
@@ -141,7 +141,7 @@ void {{classname}}::toMultipart(std::shared_ptr<MultipartFormData> multipart, co
|
|||||||
}
|
}
|
||||||
{{/required}}
|
{{/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}}multipart->add(ModelBase::toHttpContent(namePrefix + U("{{baseName}}"), m_{{name}}));
|
||||||
{{/isString}}{{^isString}}{{#isDateTime}}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<MultipartFormData> multipart, co
|
|||||||
{{/isString}}{{^isString}}{{#isDateTime}}multipart->add(ModelBase::toHttpContent(namePrefix + U("{{baseName}}"), m_{{name}}));
|
{{/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}}));
|
{{/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}}{{^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<MultipartFormData> multipart, const utility::string_t& prefix)
|
void {{classname}}::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
|
||||||
{
|
{
|
||||||
utility::string_t namePrefix = prefix;
|
utility::string_t namePrefix = prefix;
|
||||||
if(namePrefix.size() > 0 && namePrefix[namePrefix.size() - 1] != U('.'))
|
if(namePrefix.size() > 0 && namePrefix[namePrefix.size() - 1] != U('.'))
|
||||||
{
|
{
|
||||||
namePrefix += 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}}"))));
|
{{setter}}(ModelBase::{{baseType}}FromHttpContent(multipart->getContent(U("{{baseName}}"))));
|
||||||
}
|
}
|
||||||
{{/required}}{{#required}}{{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();
|
m_{{name}}.clear();
|
||||||
{{^required}}if(multipart->hasContent(U("{{baseName}}")))
|
{{^required}}if(multipart->hasContent(U("{{baseName}}")))
|
||||||
{
|
{
|
||||||
@@ -180,8 +180,8 @@ void {{classname}}::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
|||||||
web::json::value jsonArray = web::json::value::parse(ModelBase::stringFromHttpContent(multipart->getContent(U("{{baseName}}"))));
|
web::json::value jsonArray = web::json::value::parse(ModelBase::stringFromHttpContent(multipart->getContent(U("{{baseName}}"))));
|
||||||
for( auto& item : jsonArray.as_array() )
|
for( auto& item : jsonArray.as_array() )
|
||||||
{
|
{
|
||||||
{{#items.isPrimitiveType}}m_{{name}}.push_back(ModelBase::{{baseType}}FromJson(item));
|
{{#isPrimitiveType}}m_{{name}}.push_back(ModelBase::{{items.baseType}}FromJson(item));
|
||||||
{{/items.isPrimitiveType}}{{^items.isPrimitiveType}}{{#items.isString}}m_{{name}}.push_back(ModelBase::stringFromJson(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.isString}}{{^items.isString}}{{#items.isDateTime}}m_{{name}}.push_back(ModelBase::dateFromJson(item));
|
||||||
{{/items.isDateTime}}{{^items.isDateTime}}
|
{{/items.isDateTime}}{{^items.isDateTime}}
|
||||||
if(item.is_null())
|
if(item.is_null())
|
||||||
@@ -194,13 +194,13 @@ void {{classname}}::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
|||||||
newItem->fromJson(item);
|
newItem->fromJson(item);
|
||||||
m_{{name}}.push_back( newItem );
|
m_{{name}}.push_back( newItem );
|
||||||
}
|
}
|
||||||
{{/items.isDateTime}}{{/items.isString}}{{/items.isPrimitiveType}}
|
{{/items.isDateTime}}{{/items.isString}}{{/isPrimitiveType}}
|
||||||
}
|
}
|
||||||
{{^required}}
|
{{^required}}
|
||||||
}
|
}
|
||||||
{{/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}}{{setter}}(ModelBase::stringFromHttpContent(multipart->getContent(U("{{baseName}}"))));
|
||||||
{{/isString}}{{^isString}}{{#isDateTime}}{{setter}}(ModelBase::dateFromHttpContent(multipart->getContent(U("{{baseName}}"))));
|
{{/isString}}{{^isString}}{{#isDateTime}}{{setter}}(ModelBase::dateFromHttpContent(multipart->getContent(U("{{baseName}}"))));
|
||||||
@@ -218,21 +218,21 @@ void {{classname}}::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
|||||||
{{/vendorExtensions.x-codegen-file}}{{^vendorExtensions.x-codegen-file}}{{{datatype}}} new{{name}}({{{defaultValue}}});
|
{{/vendorExtensions.x-codegen-file}}{{^vendorExtensions.x-codegen-file}}{{{datatype}}} new{{name}}({{{defaultValue}}});
|
||||||
new{{name}}->fromMultiPart(multipart, U("{{baseName}}."));
|
new{{name}}->fromMultiPart(multipart, U("{{baseName}}."));
|
||||||
{{setter}}( new{{name}} );
|
{{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}}()
|
{{#vars}}{{^isNotContainer}}{{{datatype}}}& {{classname}}::{{getter}}()
|
||||||
{
|
{
|
||||||
return m_{{name}};
|
return m_{{name}};
|
||||||
}
|
}
|
||||||
{{/isNotContainer}}{{#isNotContainer}}{{{datatype}}} {{classname}}::{{getter}}() const
|
{{/isNotContainer}}{{#isNotContainer}}{{{datatype}}} {{classname}}::{{getter}}() const
|
||||||
{
|
{
|
||||||
return m_{{name}};
|
return m_{{name}};
|
||||||
}
|
}
|
||||||
void {{classname}}::{{setter}}({{{datatype}}} value)
|
void {{classname}}::{{setter}}({{{datatype}}} value)
|
||||||
{
|
{
|
||||||
m_{{name}} = value;
|
m_{{name}} = value;
|
||||||
{{^required}}m_{{name}}IsSet = true;{{/required}}
|
{{^required}}m_{{name}}IsSet = true;{{/required}}
|
||||||
}
|
}
|
||||||
{{/isNotContainer}}
|
{{/isNotContainer}}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@@ -51,12 +51,6 @@ PetApi::~PetApi()
|
|||||||
pplx::task<void> PetApi::addPet(std::shared_ptr<Pet> body)
|
pplx::task<void> PetApi::addPet(std::shared_ptr<Pet> 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> apiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<ApiConfiguration> apiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t path = U("/pet");
|
utility::string_t path = U("/pet");
|
||||||
@@ -67,8 +61,8 @@ pplx::task<void> PetApi::addPet(std::shared_ptr<Pet> body)
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -82,7 +76,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("PetApi->addPet does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -162,7 +156,7 @@ consumeHttpContentTypes.insert( U("application/xml") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -183,8 +177,8 @@ pplx::task<void> PetApi::deletePet(int64_t petId, utility::string_t apiKey)
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -198,7 +192,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("PetApi->deletePet does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -268,7 +262,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -288,8 +282,8 @@ pplx::task<std::vector<std::shared_ptr<Pet>>> PetApi::findPetsByStatus(std::vect
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -303,7 +297,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("PetApi->findPetsByStatus does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -369,7 +363,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -415,8 +409,8 @@ pplx::task<std::vector<std::shared_ptr<Pet>>> PetApi::findPetsByTags(std::vector
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -430,7 +424,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("PetApi->findPetsByTags does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -496,7 +490,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -543,8 +537,8 @@ pplx::task<std::shared_ptr<Pet>> PetApi::getPetById(int64_t petId)
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -558,7 +552,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("PetApi->getPetById does not produce any supported media type"));
|
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"));
|
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
|
// authentication (api_key) required
|
||||||
{
|
{
|
||||||
utility::string_t apiKey = apiConfiguration->getApiKey(U("api_key"));
|
utility::string_t apiKey = apiConfiguration->getApiKey(U("api_key"));
|
||||||
@@ -617,7 +613,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -629,7 +625,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -657,12 +653,6 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
pplx::task<void> PetApi::updatePet(std::shared_ptr<Pet> body)
|
pplx::task<void> PetApi::updatePet(std::shared_ptr<Pet> 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> apiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<ApiConfiguration> apiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t path = U("/pet");
|
utility::string_t path = U("/pet");
|
||||||
@@ -673,8 +663,8 @@ pplx::task<void> PetApi::updatePet(std::shared_ptr<Pet> body)
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -688,7 +678,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("PetApi->updatePet does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -768,14 +758,14 @@ consumeHttpContentTypes.insert( U("application/xml") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
return void();
|
return void();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<void> PetApi::updatePetWithForm(int64_t petId, utility::string_t name, utility::string_t status)
|
pplx::task<void> PetApi::updatePetWithForm(utility::string_t petId, utility::string_t name, utility::string_t status)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -789,8 +779,8 @@ pplx::task<void> PetApi::updatePetWithForm(int64_t petId, utility::string_t name
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -804,7 +794,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("PetApi->updatePetWithForm does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -880,14 +870,14 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
return void();
|
return void();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pplx::task<std::shared_ptr<ApiResponse>> PetApi::uploadFile(int64_t petId, utility::string_t additionalMetadata, std::shared_ptr<HttpContent> file)
|
pplx::task<void> PetApi::uploadFile(int64_t petId, utility::string_t additionalMetadata, std::shared_ptr<HttpContent> file)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -902,6 +892,7 @@ pplx::task<std::shared_ptr<ApiResponse>> PetApi::uploadFile(int64_t petId, utili
|
|||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
||||||
responseHttpContentTypes.insert( U("application/json") );
|
responseHttpContentTypes.insert( U("application/json") );
|
||||||
|
responseHttpContentTypes.insert( U("application/xml") );
|
||||||
|
|
||||||
utility::string_t responseHttpContentType;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -915,7 +906,7 @@ pplx::task<std::shared_ptr<ApiResponse>> PetApi::uploadFile(int64_t petId, utili
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("PetApi->uploadFile does not produce any supported media type"));
|
throw ApiException(400, U("PetApi->uploadFile does not produce any supported media type"));
|
||||||
}
|
}
|
||||||
@@ -979,7 +970,7 @@ pplx::task<std::shared_ptr<ApiResponse>> PetApi::uploadFile(int64_t petId, utili
|
|||||||
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -991,30 +982,12 @@ pplx::task<std::shared_ptr<ApiResponse>> PetApi::uploadFile(int64_t petId, utili
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
std::shared_ptr<ApiResponse> result(new ApiResponse());
|
return void();
|
||||||
|
});
|
||||||
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;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@@ -36,7 +36,6 @@
|
|||||||
|
|
||||||
#include "Pet.h"
|
#include "Pet.h"
|
||||||
#include <cpprest/details/basic_types.h>
|
#include <cpprest/details/basic_types.h>
|
||||||
#include "ApiResponse.h"
|
|
||||||
#include "HttpContent.h"
|
#include "HttpContent.h"
|
||||||
|
|
||||||
namespace io {
|
namespace io {
|
||||||
@@ -57,7 +56,7 @@ public:
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
/// <param name="body">Pet object that needs to be added to the store (optional)</param>
|
||||||
pplx::task<void> addPet(std::shared_ptr<Pet> body);
|
pplx::task<void> addPet(std::shared_ptr<Pet> body);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes a pet
|
/// Deletes a pet
|
||||||
@@ -73,7 +72,7 @@ public:
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Multiple status values can be provided with comma separated strings
|
/// Multiple status values can be provided with comma separated strings
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="status">Status values that need to be considered for filter</param>
|
/// <param name="status">Status values that need to be considered for filter (optional, default to available)</param>
|
||||||
pplx::task<std::vector<std::shared_ptr<Pet>>> findPetsByStatus(std::vector<utility::string_t> status);
|
pplx::task<std::vector<std::shared_ptr<Pet>>> findPetsByStatus(std::vector<utility::string_t> status);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Finds Pets by tags
|
/// Finds Pets by tags
|
||||||
@@ -81,15 +80,15 @@ public:
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="tags">Tags to filter by</param>
|
/// <param name="tags">Tags to filter by (optional)</param>
|
||||||
pplx::task<std::vector<std::shared_ptr<Pet>>> findPetsByTags(std::vector<utility::string_t> tags);
|
pplx::task<std::vector<std::shared_ptr<Pet>>> findPetsByTags(std::vector<utility::string_t> tags);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Find pet by ID
|
/// Find pet by ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Returns a single pet
|
/// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="petId">ID of pet to return</param>
|
/// <param name="petId">ID of pet that needs to be fetched</param>
|
||||||
pplx::task<std::shared_ptr<Pet>> getPetById(int64_t petId);
|
pplx::task<std::shared_ptr<Pet>> getPetById(int64_t petId);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update an existing pet
|
/// Update an existing pet
|
||||||
@@ -97,7 +96,7 @@ public:
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
/// <param name="body">Pet object that needs to be added to the store (optional)</param>
|
||||||
pplx::task<void> updatePet(std::shared_ptr<Pet> body);
|
pplx::task<void> updatePet(std::shared_ptr<Pet> body);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates a pet in the store with form data
|
/// Updates a pet in the store with form data
|
||||||
@@ -106,7 +105,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="petId">ID of pet that needs to be updated</param>/// <param name="name">Updated name of the pet (optional)</param>/// <param name="status">Updated status of the pet (optional)</param>
|
/// <param name="petId">ID of pet that needs to be updated</param>/// <param name="name">Updated name of the pet (optional)</param>/// <param name="status">Updated status of the pet (optional)</param>
|
||||||
pplx::task<void> updatePetWithForm(int64_t petId, utility::string_t name, utility::string_t status);
|
pplx::task<void> updatePetWithForm(utility::string_t petId, utility::string_t name, utility::string_t status);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// uploads an image
|
/// uploads an image
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -114,7 +113,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="petId">ID of pet to update</param>/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>/// <param name="file">file to upload (optional)</param>
|
/// <param name="petId">ID of pet to update</param>/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>/// <param name="file">file to upload (optional)</param>
|
||||||
pplx::task<std::shared_ptr<ApiResponse>> uploadFile(int64_t petId, utility::string_t additionalMetadata, std::shared_ptr<HttpContent> file);
|
pplx::task<void> uploadFile(int64_t petId, utility::string_t additionalMetadata, std::shared_ptr<HttpContent> file);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::shared_ptr<ApiClient> m_ApiClient;
|
std::shared_ptr<ApiClient> m_ApiClient;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@@ -62,8 +62,8 @@ pplx::task<void> StoreApi::deleteOrder(utility::string_t orderId)
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("StoreApi->deleteOrder does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -140,7 +140,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -161,6 +161,7 @@ pplx::task<std::map<utility::string_t, int32_t>> StoreApi::getInventory()
|
|||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
||||||
responseHttpContentTypes.insert( U("application/json") );
|
responseHttpContentTypes.insert( U("application/json") );
|
||||||
|
responseHttpContentTypes.insert( U("application/xml") );
|
||||||
|
|
||||||
utility::string_t responseHttpContentType;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -174,7 +175,7 @@ pplx::task<std::map<utility::string_t, int32_t>> StoreApi::getInventory()
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("StoreApi->getInventory does not produce any supported media type"));
|
throw ApiException(400, U("StoreApi->getInventory does not produce any supported media type"));
|
||||||
}
|
}
|
||||||
@@ -229,7 +230,7 @@ pplx::task<std::map<utility::string_t, int32_t>> StoreApi::getInventory()
|
|||||||
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -241,7 +242,7 @@ pplx::task<std::map<utility::string_t, int32_t>> StoreApi::getInventory()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -272,7 +273,7 @@ pplx::task<std::map<utility::string_t, int32_t>> StoreApi::getInventory()
|
|||||||
return result;
|
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)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -286,8 +287,8 @@ pplx::task<std::shared_ptr<Order>> StoreApi::getOrderById(int64_t orderId)
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -301,7 +302,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("StoreApi->getOrderById does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -364,7 +365,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -392,12 +393,6 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
pplx::task<std::shared_ptr<Order>> StoreApi::placeOrder(std::shared_ptr<Order> body)
|
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() );
|
std::shared_ptr<ApiConfiguration> apiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t path = U("/store/order");
|
utility::string_t path = U("/store/order");
|
||||||
@@ -408,8 +403,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::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -423,7 +418,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("StoreApi->placeOrder does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -499,7 +494,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* 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
|
/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
pplx::task<std::shared_ptr<Order>> getOrderById(int64_t orderId);
|
pplx::task<std::shared_ptr<Order>> getOrderById(utility::string_t orderId);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="body">order placed for purchasing the pet</param>
|
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
||||||
pplx::task<std::shared_ptr<Order>> placeOrder(std::shared_ptr<Order> body);
|
pplx::task<std::shared_ptr<Order>> placeOrder(std::shared_ptr<Order> body);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@@ -51,12 +51,6 @@ UserApi::~UserApi()
|
|||||||
pplx::task<void> UserApi::createUser(std::shared_ptr<User> body)
|
pplx::task<void> UserApi::createUser(std::shared_ptr<User> 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> apiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<ApiConfiguration> apiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t path = U("/user");
|
utility::string_t path = U("/user");
|
||||||
@@ -67,8 +61,8 @@ pplx::task<void> UserApi::createUser(std::shared_ptr<User> body)
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -82,7 +76,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("UserApi->createUser does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -158,7 +152,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -178,8 +172,8 @@ pplx::task<void> UserApi::createUsersWithArrayInput(std::vector<std::shared_ptr<
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -193,7 +187,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("UserApi->createUsersWithArrayInput does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -283,7 +277,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -303,8 +297,8 @@ pplx::task<void> UserApi::createUsersWithListInput(std::vector<std::shared_ptr<U
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -318,7 +312,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("UserApi->createUsersWithListInput does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -408,7 +402,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -429,8 +423,8 @@ pplx::task<void> UserApi::deleteUser(utility::string_t username)
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -444,7 +438,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("UserApi->deleteUser does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -507,7 +501,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -528,8 +522,8 @@ pplx::task<std::shared_ptr<User>> UserApi::getUserByName(utility::string_t usern
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -543,7 +537,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("UserApi->getUserByName does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -606,7 +600,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -644,8 +638,8 @@ pplx::task<utility::string_t> UserApi::loginUser(utility::string_t username, uti
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -659,7 +653,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("UserApi->loginUser does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -728,7 +722,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -767,8 +761,8 @@ pplx::task<void> UserApi::logoutUser()
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -782,7 +776,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("UserApi->logoutUser does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -841,7 +835,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
@@ -851,12 +845,6 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
pplx::task<void> UserApi::updateUser(utility::string_t username, std::shared_ptr<User> body)
|
pplx::task<void> UserApi::updateUser(utility::string_t username, std::shared_ptr<User> 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> apiConfiguration( m_ApiClient->getConfiguration() );
|
std::shared_ptr<ApiConfiguration> apiConfiguration( m_ApiClient->getConfiguration() );
|
||||||
utility::string_t path = U("/user/{username}");
|
utility::string_t path = U("/user/{username}");
|
||||||
@@ -868,8 +856,8 @@ pplx::task<void> UserApi::updateUser(utility::string_t username, std::shared_ptr
|
|||||||
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
std::map<utility::string_t, std::shared_ptr<HttpContent>> fileParams;
|
||||||
|
|
||||||
std::unordered_set<utility::string_t> responseHttpContentTypes;
|
std::unordered_set<utility::string_t> 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;
|
utility::string_t responseHttpContentType;
|
||||||
|
|
||||||
@@ -883,7 +871,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
{
|
{
|
||||||
responseHttpContentType = U("multipart/form-data");
|
responseHttpContentType = U("multipart/form-data");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw ApiException(400, U("UserApi->updateUser does not produce any supported media type"));
|
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<std::stringstream>(response.extract_utf8string(true).get()));
|
, std::make_shared<std::stringstream>(response.extract_utf8string(true).get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check response content type
|
// check response content type
|
||||||
if(response.headers().has(U("Content-Type")))
|
if(response.headers().has(U("Content-Type")))
|
||||||
{
|
{
|
||||||
utility::string_t contentType = response.headers()[U("Content-Type")];
|
utility::string_t contentType = response.headers()[U("Content-Type")];
|
||||||
@@ -963,7 +951,7 @@ responseHttpContentTypes.insert( U("application/json") );
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.extract_string();
|
return response.extract_string();
|
||||||
})
|
})
|
||||||
.then([=](utility::string_t response)
|
.then([=](utility::string_t response)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This can only be done by the logged in user.
|
/// This can only be done by the logged in user.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="body">Created user object</param>
|
/// <param name="body">Created user object (optional)</param>
|
||||||
pplx::task<void> createUser(std::shared_ptr<User> body);
|
pplx::task<void> createUser(std::shared_ptr<User> body);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
@@ -64,7 +64,7 @@ public:
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="body">List of user object</param>
|
/// <param name="body">List of user object (optional)</param>
|
||||||
pplx::task<void> createUsersWithArrayInput(std::vector<std::shared_ptr<User>> body);
|
pplx::task<void> createUsersWithArrayInput(std::vector<std::shared_ptr<User>> body);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
@@ -72,7 +72,7 @@ public:
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="body">List of user object</param>
|
/// <param name="body">List of user object (optional)</param>
|
||||||
pplx::task<void> createUsersWithListInput(std::vector<std::shared_ptr<User>> body);
|
pplx::task<void> createUsersWithListInput(std::vector<std::shared_ptr<User>> body);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete user
|
/// Delete user
|
||||||
@@ -96,7 +96,7 @@ public:
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="username">The user name for login</param>/// <param name="password">The password for login in clear text</param>
|
/// <param name="username">The user name for login (optional)</param>/// <param name="password">The password for login in clear text (optional)</param>
|
||||||
pplx::task<utility::string_t> loginUser(utility::string_t username, utility::string_t password);
|
pplx::task<utility::string_t> loginUser(utility::string_t username, utility::string_t password);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logs out current logged in user session
|
/// Logs out current logged in user session
|
||||||
@@ -112,7 +112,7 @@ public:
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This can only be done by the logged in user.
|
/// This can only be done by the logged in user.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="username">name that need to be deleted</param>/// <param name="body">Updated user object</param>
|
/// <param name="username">name that need to be deleted</param>/// <param name="body">Updated user object (optional)</param>
|
||||||
pplx::task<void> updateUser(utility::string_t username, std::shared_ptr<User> body);
|
pplx::task<void> updateUser(utility::string_t username, std::shared_ptr<User> body);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@@ -33,7 +33,7 @@ namespace model {
|
|||||||
|
|
||||||
Category::Category()
|
Category::Category()
|
||||||
{
|
{
|
||||||
m_Id = 0L;
|
m_Id = 0;
|
||||||
m_IdIsSet = false;
|
m_IdIsSet = false;
|
||||||
m_Name = U("");
|
m_Name = U("");
|
||||||
m_NameIsSet = false;
|
m_NameIsSet = false;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@@ -33,9 +33,9 @@ namespace model {
|
|||||||
|
|
||||||
Order::Order()
|
Order::Order()
|
||||||
{
|
{
|
||||||
m_Id = 0L;
|
m_Id = 0;
|
||||||
m_IdIsSet = false;
|
m_IdIsSet = false;
|
||||||
m_PetId = 0L;
|
m_PetId = 0;
|
||||||
m_PetIdIsSet = false;
|
m_PetIdIsSet = false;
|
||||||
m_Quantity = 0;
|
m_Quantity = 0;
|
||||||
m_QuantityIsSet = false;
|
m_QuantityIsSet = false;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@@ -33,7 +33,7 @@ namespace model {
|
|||||||
|
|
||||||
Pet::Pet()
|
Pet::Pet()
|
||||||
{
|
{
|
||||||
m_Id = 0L;
|
m_Id = 0;
|
||||||
m_IdIsSet = false;
|
m_IdIsSet = false;
|
||||||
m_CategoryIsSet = false;
|
m_CategoryIsSet = false;
|
||||||
m_Name = U("");
|
m_Name = U("");
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@@ -34,10 +34,10 @@
|
|||||||
|
|
||||||
#include "ModelBase.h"
|
#include "ModelBase.h"
|
||||||
|
|
||||||
#include "Category.h"
|
|
||||||
#include <cpprest/details/basic_types.h>
|
|
||||||
#include <vector>
|
|
||||||
#include "Tag.h"
|
#include "Tag.h"
|
||||||
|
#include <cpprest/details/basic_types.h>
|
||||||
|
#include "Category.h"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace io {
|
namespace io {
|
||||||
namespace swagger {
|
namespace swagger {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@@ -33,7 +33,7 @@ namespace model {
|
|||||||
|
|
||||||
Tag::Tag()
|
Tag::Tag()
|
||||||
{
|
{
|
||||||
m_Id = 0L;
|
m_Id = 0;
|
||||||
m_IdIsSet = false;
|
m_IdIsSet = false;
|
||||||
m_Name = U("");
|
m_Name = U("");
|
||||||
m_NameIsSet = false;
|
m_NameIsSet = false;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@@ -33,7 +33,7 @@ namespace model {
|
|||||||
|
|
||||||
User::User()
|
User::User()
|
||||||
{
|
{
|
||||||
m_Id = 0L;
|
m_Id = 0;
|
||||||
m_IdIsSet = false;
|
m_IdIsSet = false;
|
||||||
m_Username = U("");
|
m_Username = U("");
|
||||||
m_UsernameIsSet = false;
|
m_UsernameIsSet = false;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
|||||||
Reference in New Issue
Block a user