diff --git a/src/DemoApiClient.hpp b/src/DemoApiClient.hpp index e1a2222..5cf9083 100644 --- a/src/DemoApiClient.hpp +++ b/src/DemoApiClient.hpp @@ -22,7 +22,7 @@ class DemoApiClient : public oatpp::web::client::ApiClient { API_CALL("PATCH", "patch", doPatch, BODY_STRING(String, body)) API_CALL("DELETE", "delete", doDelete) - API_CALL("POST", "post", doPostWithDto, BODY_DTO(MyRequestDto::ObjectWrapper, body)) + API_CALL("POST", "post", doPostWithDto, BODY_DTO(Object, body)) API_CALL("GET", "anything/{parameter}", doGetAnything, PATH(String, parameter)) API_CALL("POST", "anything/{parameter}", doPostAnything, PATH(String, parameter), BODY_STRING(String, body)) @@ -39,7 +39,7 @@ class DemoApiClient : public oatpp::web::client::ApiClient { API_CALL_ASYNC("PATCH", "patch", doPatchAsync, BODY_STRING(String, body)) API_CALL_ASYNC("DELETE", "delete", doDeleteAsync) - API_CALL_ASYNC("POST", "post", doPostWithDtoAsync, BODY_DTO(MyRequestDto::ObjectWrapper, body)) + API_CALL_ASYNC("POST", "post", doPostWithDtoAsync, BODY_DTO(Object, body)) API_CALL_ASYNC("GET", "anything/{parameter}", doGetAnythingAsync, PATH(String, parameter)) API_CALL_ASYNC("POST", "anything/{parameter}", doPostAnythingAsync, PATH(String, parameter), BODY_STRING(String, body)) diff --git a/src/DemoApiModels.hpp b/src/DemoApiModels.hpp index 331e723..8bf7868 100644 --- a/src/DemoApiModels.hpp +++ b/src/DemoApiModels.hpp @@ -2,23 +2,23 @@ #ifndef DemoApiModels_hpp #define DemoApiModels_hpp -#include "oatpp/core/data/mapping/type/Object.hpp" +#include "oatpp/core/Types.hpp" #include "oatpp/core/macro/codegen.hpp" #include OATPP_CODEGEN_BEGIN(DTO) -class MyRequestDto : public oatpp::data::mapping::type::Object { +class MyRequestDto : public oatpp::DTO { - DTO_INIT(MyRequestDto, Object) + DTO_INIT(MyRequestDto, DTO) DTO_FIELD(String, message); DTO_FIELD(Int32, code); }; -class HttpBinResponseDto : public oatpp::data::mapping::type::Object { +class HttpBinResponseDto : public oatpp::DTO { - DTO_INIT(HttpBinResponseDto, Object) + DTO_INIT(HttpBinResponseDto, DTO) DTO_FIELD(String, data); DTO_FIELD(Fields::ObjectWrapper, headers);