File tree 6 files changed +7
-44
lines changed
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
15
15
16
16
## link libs
17
17
18
- find_package (oatpp 1.0 .0 REQUIRED)
18
+ find_package (oatpp 1.1 .0 REQUIRED)
19
19
20
20
target_link_libraries (${project_name} -lib
21
21
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
- //
8
1
9
2
#include " ./controller/MyController.hpp"
10
3
#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
- //
8
1
9
2
#ifndef AppComponent_hpp
10
3
#define AppComponent_hpp
Original file line number Diff line number Diff line change 1
- //
2
- // Created by Leonid on 2019-05-27.
3
- //
4
1
5
2
#include " MyController.hpp"
6
3
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
- //
8
1
9
2
#ifndef MyController_hpp
10
3
#define MyController_hpp
15
8
#include " oatpp/core/macro/codegen.hpp"
16
9
#include " oatpp/core/macro/component.hpp"
17
10
11
+ #include OATPP_CODEGEN_BEGIN(ApiController) // <-- Begin codegen
12
+
18
13
/* *
19
14
* EXAMPLE ApiController
20
15
* Basic examples of howto create ENDPOINTs
@@ -36,11 +31,6 @@ class MyController : public oatpp::web::server::api::ApiController {
36
31
return std::shared_ptr<MyController>(new MyController (objectMapper));
37
32
}
38
33
39
- /* *
40
- * Begin ENDPOINTs generation ('ApiController' codegen)
41
- */
42
- #include OATPP_CODEGEN_BEGIN(ApiController)
43
-
44
34
/* *
45
35
* Hello World endpoint Coroutine mapped to the "/" (root)
46
36
*/
@@ -101,11 +91,8 @@ class MyController : public oatpp::web::server::api::ApiController {
101
91
102
92
};
103
93
104
- /* *
105
- * Finish ENDPOINTs generation ('ApiController' codegen)
106
- */
107
- #include OATPP_CODEGEN_END(ApiController)
108
-
109
94
};
110
95
96
+ #include OATPP_CODEGEN_BEGIN(ApiController) // <-- End codegen
97
+
111
98
#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
- //
8
1
9
2
#ifndef MyDTOs_hpp
10
3
#define MyDTOs_hpp
18
11
* Data Transfer Object. Object containing fields only.
19
12
* Used in API for serialization/deserialization and validation
20
13
*/
21
- class HelloDto : public oatpp ::data::mapping::type:: Object {
14
+ class HelloDto : public oatpp ::Object {
22
15
23
16
DTO_INIT (HelloDto, Object)
24
17
@@ -28,7 +21,7 @@ class HelloDto : public oatpp::data::mapping::type::Object {
28
21
29
22
};
30
23
31
- class MessageDto : public oatpp ::data::mapping::type:: Object {
24
+ class MessageDto : public oatpp ::Object {
32
25
33
26
DTO_INIT (MessageDto, Object)
34
27
You can’t perform that action at this time.
0 commit comments