@@ -29,7 +29,7 @@ class UserController : public oatpp::web::server::api::ApiController {
2929 : oatpp::web::server::api::ApiController(objectMapper)
3030 {}
3131private:
32- OATPP_COMPONENT (ConfigDto::ObjectWrapper , config); // Inject config
32+ OATPP_COMPONENT (oatpp::Object<ConfigDto> , config); // Inject config
3333 OATPP_COMPONENT (std::shared_ptr<Database>, database); // Inject database
3434private:
3535 void assertUid (const oatpp::String& uid);
@@ -48,12 +48,12 @@ class UserController : public oatpp::web::server::api::ApiController {
4848
4949 ENDPOINT_INFO (createUser) {
5050 info->summary = " Create new User" ;
51- info->addConsumes <UserDto>(" application/json" );
52- info->addResponse <UserDto>(Status::CODE_200, " application/json" );
53- info->addResponse <ErrorDto>(Status::CODE_500, " application/json" );
51+ info->addConsumes <oatpp::Object< UserDto> >(" application/json" );
52+ info->addResponse <oatpp::Object< UserDto> >(Status::CODE_200, " application/json" );
53+ info->addResponse <oatpp::Object< ErrorDto> >(Status::CODE_500, " application/json" );
5454 }
5555 ENDPOINT (" POST" , " /users" , createUser,
56- BODY_DTO (UserDto, user)) {
56+ BODY_DTO (Object< UserDto> , user)) {
5757 assertLogin (user->login );
5858 assertEmail (user->email );
5959 assertPassword (user->password );
@@ -65,8 +65,8 @@ class UserController : public oatpp::web::server::api::ApiController {
6565
6666 ENDPOINT_INFO (getUserByUid) {
6767 info->summary = " Get user by UID" ;
68- info->addResponse <UserDto>(Status::CODE_200, " application/json" );
69- info->addResponse <ErrorDto>(Status::CODE_500, " application/json" );
68+ info->addResponse <oatpp::Object< UserDto> >(Status::CODE_200, " application/json" );
69+ info->addResponse <oatpp::Object< ErrorDto> >(Status::CODE_500, " application/json" );
7070 }
7171 ENDPOINT (" GET" , " /users/uid/{userId}" , getUserByUid,
7272 PATH (String, userId)) {
@@ -79,8 +79,8 @@ class UserController : public oatpp::web::server::api::ApiController {
7979
8080 ENDPOINT_INFO (getUserByLogin) {
8181 info->summary = " Get user by Login" ;
82- info->addResponse <UserDto>(Status::CODE_200, " application/json" );
83- info->addResponse <ErrorDto>(Status::CODE_500, " application/json" );
82+ info->addResponse <oatpp::Object< UserDto> >(Status::CODE_200, " application/json" );
83+ info->addResponse <oatpp::Object< ErrorDto> >(Status::CODE_500, " application/json" );
8484 }
8585 ENDPOINT (" GET" , " /users/login/{login}" , getUserByLogin,
8686 PATH (String, login)) {
@@ -93,8 +93,8 @@ class UserController : public oatpp::web::server::api::ApiController {
9393
9494 ENDPOINT_INFO (getUserByEmail) {
9595 info->summary = " Get user by Email" ;
96- info->addResponse <UserDto>(Status::CODE_200, " application/json" );
97- info->addResponse <ErrorDto>(Status::CODE_500, " application/json" );
96+ info->addResponse <oatpp::Object< UserDto> >(Status::CODE_200, " application/json" );
97+ info->addResponse <oatpp::Object< ErrorDto> >(Status::CODE_500, " application/json" );
9898 }
9999 ENDPOINT (" GET" , " /users/email/{email}" , getUserByEmail,
100100 PATH (String, email)) {
0 commit comments