Skip to content

Commit 27ea271

Browse files
committed
Update to the latest oatpp API.
1 parent 29e7e4d commit 27ea271

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/DemoApiClient.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class DemoApiClient : public oatpp::web::client::ApiClient {
2222
API_CALL("PATCH", "patch", doPatch, BODY_STRING(String, body))
2323
API_CALL("DELETE", "delete", doDelete)
2424

25-
API_CALL("POST", "post", doPostWithDto, BODY_DTO(MyRequestDto::ObjectWrapper, body))
25+
API_CALL("POST", "post", doPostWithDto, BODY_DTO(Object<MyRequestDto>, body))
2626

2727
API_CALL("GET", "anything/{parameter}", doGetAnything, PATH(String, parameter))
2828
API_CALL("POST", "anything/{parameter}", doPostAnything, PATH(String, parameter), BODY_STRING(String, body))
@@ -39,7 +39,7 @@ class DemoApiClient : public oatpp::web::client::ApiClient {
3939
API_CALL_ASYNC("PATCH", "patch", doPatchAsync, BODY_STRING(String, body))
4040
API_CALL_ASYNC("DELETE", "delete", doDeleteAsync)
4141

42-
API_CALL_ASYNC("POST", "post", doPostWithDtoAsync, BODY_DTO(MyRequestDto::ObjectWrapper, body))
42+
API_CALL_ASYNC("POST", "post", doPostWithDtoAsync, BODY_DTO(Object<MyRequestDto>, body))
4343

4444
API_CALL_ASYNC("GET", "anything/{parameter}", doGetAnythingAsync, PATH(String, parameter))
4545
API_CALL_ASYNC("POST", "anything/{parameter}", doPostAnythingAsync, PATH(String, parameter), BODY_STRING(String, body))

src/DemoApiModels.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
#ifndef DemoApiModels_hpp
33
#define DemoApiModels_hpp
44

5-
#include "oatpp/core/data/mapping/type/Object.hpp"
5+
#include "oatpp/core/Types.hpp"
66
#include "oatpp/core/macro/codegen.hpp"
77

88
#include OATPP_CODEGEN_BEGIN(DTO)
99

10-
class MyRequestDto : public oatpp::data::mapping::type::Object {
10+
class MyRequestDto : public oatpp::DTO {
1111

12-
DTO_INIT(MyRequestDto, Object)
12+
DTO_INIT(MyRequestDto, DTO)
1313

1414
DTO_FIELD(String, message);
1515
DTO_FIELD(Int32, code);
1616

1717
};
1818

19-
class HttpBinResponseDto : public oatpp::data::mapping::type::Object {
19+
class HttpBinResponseDto : public oatpp::DTO {
2020

21-
DTO_INIT(HttpBinResponseDto, Object)
21+
DTO_INIT(HttpBinResponseDto, DTO)
2222

2323
DTO_FIELD(String, data);
2424
DTO_FIELD(Fields<String>::ObjectWrapper, headers);

0 commit comments

Comments
 (0)