@@ -67,27 +67,27 @@ class UserController : public oatpp::web::server::api::ApiController {
6767
6868 ENDPOINT_INFO (createUser) {
6969 info->summary = " Create new User" ;
70- info->addConsumes <UserDto>(" application/json" );
71- info->addResponse <UserDto>(Status::CODE_200, " application/json" );
70+ info->addConsumes <Object< UserDto> >(" application/json" );
71+ info->addResponse <Object< UserDto> >(Status::CODE_200, " application/json" );
7272 }
7373 ENDPOINT (" POST" , " demo/api/users" , createUser,
74- BODY_DTO (UserDto, userDto)) {
74+ BODY_DTO (Object< UserDto> , userDto)) {
7575 return createDtoResponse (Status::CODE_200, m_database->createUser (userDto));
7676 }
7777
7878
7979 ENDPOINT_INFO (putUser) {
8080 // general
8181 info->summary = " Update User by userId" ;
82- info->addConsumes <UserDto>(" application/json" );
83- info->addResponse <UserDto>(Status::CODE_200, " application/json" );
82+ info->addConsumes <Object< UserDto> >(" application/json" );
83+ info->addResponse <Object< UserDto> >(Status::CODE_200, " application/json" );
8484 info->addResponse <String>(Status::CODE_404, " text/plain" );
8585 // params specific
8686 info->pathParams [" userId" ].description = " User Identifier" ;
8787 }
8888 ENDPOINT (" PUT" , " demo/api/users/{userId}" , putUser,
8989 PATH (Int32, userId),
90- BODY_DTO(UserDto, userDto)) {
90+ BODY_DTO(Object< UserDto> , userDto)) {
9191 userDto->id = userId;
9292 return createDtoResponse (Status::CODE_200, m_database->updateUser (userDto));
9393 }
@@ -96,7 +96,7 @@ class UserController : public oatpp::web::server::api::ApiController {
9696 ENDPOINT_INFO (getUserById) {
9797 // general
9898 info->summary = " Get one User by userId" ;
99- info->addResponse <UserDto>(Status::CODE_200, " application/json" );
99+ info->addResponse <Object< UserDto> >(Status::CODE_200, " application/json" );
100100 info->addResponse <String>(Status::CODE_404, " text/plain" );
101101 // params specific
102102 info->pathParams [" userId" ].description = " User Identifier" ;
@@ -111,7 +111,7 @@ class UserController : public oatpp::web::server::api::ApiController {
111111
112112 ENDPOINT_INFO (getUsers) {
113113 info->summary = " get all stored users" ;
114- info->addResponse <List<UserDto>>(Status::CODE_200, " application/json" );
114+ info->addResponse <List<Object< UserDto> >>(Status::CODE_200, " application/json" );
115115 }
116116 ENDPOINT (" GET" , " demo/api/users" , getUsers) {
117117 return createDtoResponse (Status::CODE_200, m_database->getUsers ());
0 commit comments