File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
5
5
## use these variables to configure module installation
6
6
7
7
set (OATPP_THIS_MODULE_NAME oatpp-mbedtls ) ## name of the module (also name of folders in installation dirs)
8
- set (OATPP_THIS_MODULE_VERSION "1.0 .0" ) ## version of the module (also sufix of folders in installation dirs)
8
+ set (OATPP_THIS_MODULE_VERSION "1.1 .0" ) ## version of the module (also sufix of folders in installation dirs)
9
9
set (OATPP_THIS_MODULE_LIBRARIES oatpp-mbedtls ) ## list of libraries to find when find_package is called
10
10
set (OATPP_THIS_MODULE_TARGETS oatpp-mbedtls ) ## list of targets to install
11
11
set (OATPP_THIS_MODULE_DIRECTORIES oatpp-mbedtls ) ## list of directories to install
Original file line number Diff line number Diff line change @@ -172,10 +172,10 @@ void FullTest::onRun() {
172
172
auto dto = response->readBodyToDto <app::TestDto>(objectMapper.get ());
173
173
OATPP_ASSERT (dto);
174
174
OATPP_ASSERT (dto->testMap );
175
- OATPP_ASSERT (dto->testMap ->count () == 3 );
176
- OATPP_ASSERT (dto->testMap -> get ( " key1" , " " ) == " value1" );
177
- OATPP_ASSERT (dto->testMap -> get ( " key2" , " " ) == " 32" );
178
- OATPP_ASSERT (dto->testMap -> get ( " key3" , " " ) == oatpp::utils::conversion::float32ToStr (0.32 ));
175
+ OATPP_ASSERT (dto->testMap ->size () == 3 );
176
+ OATPP_ASSERT (dto->testMap [ " key1" ] == " value1" );
177
+ OATPP_ASSERT (dto->testMap [ " key2" ] == " 32" );
178
+ OATPP_ASSERT (dto->testMap [ " key3" ] == oatpp::utils::conversion::float32ToStr (0.32 ));
179
179
}
180
180
181
181
{ // test GET with header parameter
Original file line number Diff line number Diff line change @@ -67,16 +67,16 @@ class Controller : public oatpp::web::server::api::ApiController {
67
67
ENDPOINT (" GET" , " queries" , getWithQueries,
68
68
QUERY (String, name), QUERY(Int32, age)) {
69
69
auto dto = TestDto::createShared ();
70
- dto->testValue = " name=" + name + " &age=" + oatpp::utils::conversion::int32ToStr (age-> getValue () );
70
+ dto->testValue = " name=" + name + " &age=" + oatpp::utils::conversion::int32ToStr (age);
71
71
return createDtoResponse (Status::CODE_200, dto);
72
72
}
73
73
74
74
ENDPOINT (" GET" , " queries/map" , getWithQueriesMap,
75
- QUERIES (const QueryParams& , queries)) {
75
+ QUERIES (QueryParams, queries)) {
76
76
auto dto = TestDto::createShared ();
77
- dto->testMap = dto-> testMap -> createShared ();
77
+ dto->testMap = Fields<String>:: createShared ();
78
78
for (auto & it : queries.getAll_Unsafe ()) {
79
- dto->testMap ->put ( it.first .toString (), it.second .toString ());
79
+ dto->testMap ->push_back ({ it.first .toString (), it.second .toString ()} );
80
80
}
81
81
return createDtoResponse (Status::CODE_200, dto);
82
82
}
Original file line number Diff line number Diff line change 25
25
#ifndef oatpp_test_web_app_DTOs_hpp
26
26
#define oatpp_test_web_app_DTOs_hpp
27
27
28
- #include " oatpp/core/data/mapping/type/Object.hpp"
29
28
#include " oatpp/core/macro/codegen.hpp"
29
+ #include " oatpp/core/Types.hpp"
30
30
31
31
namespace oatpp { namespace test { namespace mbedtls { namespace app {
32
32
33
33
#include OATPP_CODEGEN_BEGIN(DTO)
34
34
35
- class TestDto : public oatpp ::data::mapping::type:: Object {
35
+ class TestDto : public oatpp ::Object {
36
36
37
37
DTO_INIT (TestDto, Object)
38
38
39
39
DTO_FIELD (String, testValue);
40
- DTO_FIELD (Fields<String>::ObjectWrapper , testMap);
40
+ DTO_FIELD (Fields<String>, testMap);
41
41
42
42
};
43
43
You can’t perform that action at this time.
0 commit comments