Skip to content

Commit

Permalink
Update to the latest oatpp API.
Browse files Browse the repository at this point in the history
  • Loading branch information
lganzzzo committed May 23, 2020
1 parent 0fe9446 commit 1ec9f48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/dto/DTOs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
* Data Transfer Object. Object containing fields only.
* Used in API for serialization/deserialization and validation
*/
class MyDto : public oatpp::Object {
class MyDto : public oatpp::DTO {

DTO_INIT(MyDto, Object)
DTO_INIT(MyDto, DTO)

DTO_FIELD(Int32, statusCode);
DTO_FIELD(String, message);
Expand Down
2 changes: 1 addition & 1 deletion test/MyControllerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void MyControllerTest::onRun() {
OATPP_ASSERT(response->getStatusCode() == 200);

/* Read response body as MessageDto */
auto message = response->readBodyToDto<MyDto>(objectMapper.get());
auto message = response->readBodyToDto<oatpp::Object<MyDto>>(objectMapper.get());

/* Assert that received message is as expected */
OATPP_ASSERT(message);
Expand Down

0 comments on commit 1ec9f48

Please sign in to comment.