sunn 97d6b71460 [cpp-pistache] Fix compilation of petstore for Pistache (#497)
* Fix compilation of petstore for Pistache
Add Map support

* Add support for ByteArray

* Add Support for ByteArray in cpprest

* Implement TODOs
2018-07-20 22:04:25 +08:00

67 lines
1.1 KiB
C++

/**
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "ModelBase.h"
namespace org {
namespace openapitools {
namespace server {
namespace model {
ModelBase::ModelBase()
{
}
ModelBase::~ModelBase()
{
}
std::string ModelBase::toJson( std::string const& value )
{
return value;
}
std::string ModelBase::toJson( std::time_t const& value )
{
char buf[sizeof "2011-10-08T07:07:09Z"];
strftime(buf, sizeof buf, "%FT%TZ", gmtime(&value));
return buf;
}
int32_t ModelBase::toJson( int32_t const value )
{
return value;
}
int64_t ModelBase::toJson( int64_t const value )
{
return value;
}
double ModelBase::toJson( double const value )
{
return value;
}
bool ModelBase::toJson( bool const value )
{
return value;
}
nlohmann::json ModelBase::toJson(ModelBase const& content )
{
return content.toJson();
}
}
}
}
}