diff --git a/src/dto/DTOs.hpp b/src/dto/DTOs.hpp index 6295e3e..72dbf9f 100644 --- a/src/dto/DTOs.hpp +++ b/src/dto/DTOs.hpp @@ -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); diff --git a/test/MyControllerTest.cpp b/test/MyControllerTest.cpp index fce6933..a063d5a 100644 --- a/test/MyControllerTest.cpp +++ b/test/MyControllerTest.cpp @@ -43,7 +43,7 @@ void MyControllerTest::onRun() { OATPP_ASSERT(response->getStatusCode() == 200); /* Read response body as MessageDto */ - auto message = response->readBodyToDto(objectMapper.get()); + auto message = response->readBodyToDto>(objectMapper.get()); /* Assert that received message is as expected */ OATPP_ASSERT(message);