forked from loafle/openapi-generator-original
[CppRest] Overload toJson for bool in Modelbase (#5448)
* Add operationId in exception message * add number data type mapping * fix_issue5434
This commit is contained in:
parent
f61e0d4024
commit
e9a438b73f
@ -40,6 +40,7 @@ public:
|
|||||||
static web::json::value toJson( int32_t value );
|
static web::json::value toJson( int32_t value );
|
||||||
static web::json::value toJson( int64_t value );
|
static web::json::value toJson( int64_t value );
|
||||||
static web::json::value toJson( double value );
|
static web::json::value toJson( double value );
|
||||||
|
static web::json::value toJson( bool value );
|
||||||
|
|
||||||
static int64_t int64_tFromJson(web::json::value& val);
|
static int64_t int64_tFromJson(web::json::value& val);
|
||||||
static int32_t int32_tFromJson(web::json::value& val);
|
static int32_t int32_tFromJson(web::json::value& val);
|
||||||
|
@ -31,6 +31,9 @@ web::json::value ModelBase::toJson( int64_t value )
|
|||||||
web::json::value ModelBase::toJson( double value )
|
web::json::value ModelBase::toJson( double value )
|
||||||
{
|
{
|
||||||
return web::json::value::number(value);
|
return web::json::value::number(value);
|
||||||
|
}
|
||||||
|
web::json::value ModelBase::toJson(bool value) {
|
||||||
|
return web::json::value::boolean(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
web::json::value ModelBase::toJson( std::shared_ptr<HttpContent> content )
|
web::json::value ModelBase::toJson( std::shared_ptr<HttpContent> content )
|
||||||
|
@ -43,6 +43,9 @@ web::json::value ModelBase::toJson( int64_t value )
|
|||||||
web::json::value ModelBase::toJson( double value )
|
web::json::value ModelBase::toJson( double value )
|
||||||
{
|
{
|
||||||
return web::json::value::number(value);
|
return web::json::value::number(value);
|
||||||
|
}
|
||||||
|
web::json::value ModelBase::toJson(bool value) {
|
||||||
|
return web::json::value::boolean(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
web::json::value ModelBase::toJson( std::shared_ptr<HttpContent> content )
|
web::json::value ModelBase::toJson( std::shared_ptr<HttpContent> content )
|
||||||
|
@ -52,6 +52,7 @@ public:
|
|||||||
static web::json::value toJson( int32_t value );
|
static web::json::value toJson( int32_t value );
|
||||||
static web::json::value toJson( int64_t value );
|
static web::json::value toJson( int64_t value );
|
||||||
static web::json::value toJson( double value );
|
static web::json::value toJson( double value );
|
||||||
|
static web::json::value toJson( bool value );
|
||||||
|
|
||||||
static int64_t int64_tFromJson(web::json::value& val);
|
static int64_t int64_tFromJson(web::json::value& val);
|
||||||
static int32_t int32_tFromJson(web::json::value& val);
|
static int32_t int32_tFromJson(web::json::value& val);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user