[CppRest] Add Object and fix modelbase includes (#6905)

* Objects are represented by `ModelBase.h`, not `Object.h` which does not exist.

* Use correct relative imports for files in the `model` and `api` folders.

* [CppRest] Update cpprest petstore client sample.

* Implement `Object` class to support arbitrary types.

* [CppRest] Update cpprest petstore client sample.

* [CppRest] Add newly generated files to petstore client sample.

* [CppRest] Add `Object` to CMakeLists.
This commit is contained in:
François Rosé
2017-11-22 05:19:13 +01:00
committed by William Cheng
parent d9cea0f97e
commit acefe3f385
22 changed files with 293 additions and 13 deletions

View File

@@ -367,6 +367,12 @@ double ModelBase::doubleFromHttpContent(std::shared_ptr<HttpContent> val)
return result;
}
web::json::value ModelBase::valueFromHttpContent(std::shared_ptr<HttpContent> val)
{
utility::string_t str = ModelBase::stringFromHttpContent(val);
return web::json::value::parse(str);
}
}
}
}