File tree Expand file tree Collapse file tree 6 files changed +7
-44
lines changed Expand file tree Collapse file tree 6 files changed +7
-44
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ add_library(${project_name}-lib
1515
1616## link libs
1717
18- find_package (oatpp 1.0 .0 REQUIRED)
18+ find_package (oatpp 1.1 .0 REQUIRED)
1919
2020target_link_libraries (${project_name} -lib
2121 PUBLIC oatpp::oatpp
Original file line number Diff line number Diff line change 1- //
2- // main.cpp
3- // web-starter-project
4- //
5- // Created by Leonid on 2/12/18.
6- // Copyright © 2018 oatpp. All rights reserved.
7- //
81
92#include " ./controller/MyController.hpp"
103#include " ./AppComponent.hpp"
Original file line number Diff line number Diff line change 1- //
2- // AppComponent.hpp
3- // oatpp-web-starter
4- //
5- // Created by Leonid on 3/2/18.
6- // Copyright © 2018 lganzzzo. All rights reserved.
7- //
81
92#ifndef AppComponent_hpp
103#define AppComponent_hpp
Original file line number Diff line number Diff line change 1- //
2- // Created by Leonid on 2019-05-27.
3- //
41
52#include " MyController.hpp"
63
Original file line number Diff line number Diff line change 1- //
2- // MyController.hpp
3- // web-starter-project
4- //
5- // Created by Leonid on 2/12/18.
6- // Copyright © 2018 oatpp. All rights reserved.
7- //
81
92#ifndef MyController_hpp
103#define MyController_hpp
158#include " oatpp/core/macro/codegen.hpp"
169#include " oatpp/core/macro/component.hpp"
1710
11+ #include OATPP_CODEGEN_BEGIN(ApiController) // <-- Begin codegen
12+
1813/* *
1914 * EXAMPLE ApiController
2015 * Basic examples of howto create ENDPOINTs
@@ -36,11 +31,6 @@ class MyController : public oatpp::web::server::api::ApiController {
3631 return std::shared_ptr<MyController>(new MyController (objectMapper));
3732 }
3833
39- /* *
40- * Begin ENDPOINTs generation ('ApiController' codegen)
41- */
42- #include OATPP_CODEGEN_BEGIN(ApiController)
43-
4434 /* *
4535 * Hello World endpoint Coroutine mapped to the "/" (root)
4636 */
@@ -101,11 +91,8 @@ class MyController : public oatpp::web::server::api::ApiController {
10191
10292 };
10393
104- /* *
105- * Finish ENDPOINTs generation ('ApiController' codegen)
106- */
107- #include OATPP_CODEGEN_END(ApiController)
108-
10994};
11095
96+ #include OATPP_CODEGEN_BEGIN(ApiController) // <-- End codegen
97+
11198#endif /* MyController_hpp */
Original file line number Diff line number Diff line change 1- //
2- // UserDto.hpp
3- // crud
4- //
5- // Created by Leonid on 3/13/18.
6- // Copyright © 2018 oatpp. All rights reserved.
7- //
81
92#ifndef MyDTOs_hpp
103#define MyDTOs_hpp
1811 * Data Transfer Object. Object containing fields only.
1912 * Used in API for serialization/deserialization and validation
2013 */
21- class HelloDto : public oatpp ::data::mapping::type:: Object {
14+ class HelloDto : public oatpp ::Object {
2215
2316 DTO_INIT (HelloDto, Object)
2417
@@ -28,7 +21,7 @@ class HelloDto : public oatpp::data::mapping::type::Object {
2821
2922};
3023
31- class MessageDto : public oatpp ::data::mapping::type:: Object {
24+ class MessageDto : public oatpp ::Object {
3225
3326 DTO_INIT (MessageDto, Object)
3427
You can’t perform that action at this time.
0 commit comments