File tree 5 files changed +11
-14
lines changed
5 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ target_include_directories(${project_name}-lib PUBLIC src)
27
27
28
28
## link libs
29
29
30
- find_package (oatpp 1.2.5 REQUIRED)
31
- find_package (oatpp-swagger 1.2.5 REQUIRED)
32
- find_package (oatpp-postgresql 1.2.5 REQUIRED)
30
+ find_package (oatpp 1.3.0 REQUIRED)
31
+ find_package (oatpp-swagger 1.3.0 REQUIRED)
32
+ find_package (oatpp-postgresql 1.3.0 REQUIRED)
33
33
34
34
target_link_libraries (${project_name} -lib
35
35
PUBLIC oatpp::oatpp
Original file line number Diff line number Diff line change 4
4
# https://aka.ms/yaml
5
5
6
6
jobs :
7
- - job : ubuntu_16_04
8
- displayName : ' Build - Ubuntu 16 .04'
7
+ - job : ubuntu_20_04
8
+ displayName : ' Build - Ubuntu 20 .04'
9
9
continueOnError : false
10
10
pool :
11
- vmImage : ' Ubuntu 16 .04'
11
+ vmImage : ' ubuntu-20 .04'
12
12
workspace :
13
13
clean : all
14
14
steps :
Original file line number Diff line number Diff line change @@ -21,15 +21,11 @@ void run(const oatpp::base::CommandLineArguments& args) {
21
21
/* create ApiControllers and add endpoints to router */
22
22
23
23
auto router = serviceComponent.httpRouter .getObject ();
24
- auto docEndpoints = oatpp::swagger::Controller::Endpoints::createShared () ;
24
+ oatpp::web::server::api::Endpoints docEndpoints ;
25
25
26
- auto userController = UserController::createShared ();
27
- userController->addEndpointsToRouter (router);
26
+ docEndpoints.append (router->addController (UserController::createShared ())->getEndpoints ());
28
27
29
- docEndpoints->pushBackAll (userController->getEndpoints ()); // Add userController to swagger
30
-
31
- auto swaggerController = oatpp::swagger::Controller::createShared (docEndpoints);
32
- swaggerController->addEndpointsToRouter (router);
28
+ router->addController (oatpp::swagger::Controller::createShared (docEndpoints));
33
29
34
30
/* create server */
35
31
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class AppComponent {
28
28
const char * configPath = CONFIG_PATH;
29
29
auto objectMapper = oatpp::parser::json::mapping::ObjectMapper::createShared ();
30
30
31
- oatpp::String configText = oatpp::base::StrBuffer ::loadFromFile (configPath);
31
+ oatpp::String configText = oatpp::String ::loadFromFile (configPath);
32
32
if (configText) {
33
33
34
34
auto profiles = objectMapper->readFromString <oatpp::Fields<oatpp::Object<ConfigDto>>>(configText);
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ class ServiceComponent {
21
21
OATPP_CREATE_COMPONENT (std::shared_ptr<oatpp::data::mapping::ObjectMapper>, apiObjectMapper)([] {
22
22
auto mapper = oatpp::parser::json::mapping::ObjectMapper::createShared ();
23
23
mapper->getSerializer ()->getConfig ()->useBeautifier = true ;
24
+ mapper->getSerializer ()->getConfig ()->escapeFlags = 0 ;
24
25
return mapper;
25
26
}());
26
27
You can’t perform that action at this time.
0 commit comments