- Work in progress issue
- Old pull request for
cpp-oatpp-server
This project extends Oat++ starter by adding DTOs, controllers, and API-Key and OAuth2 security schemes as defined in OpenAPI spec.
Endpoints with apiKey
security:
- "GET", "/pet/{petId}"
- "DELETE", "/pet/{petId}"
- "GET", "/store/inventory"
- "POST", "/user"
- "POST", "/user/createWithArray"
- "POST", "/user/createWithList"
- "GET", "/user/logout"
- "PUT", "/user/{username}"
- "DELETE", "/user/{username}"
OAuth2 endpoints:
- "POST", "/pet"
- "PUT", "/pet"
- "GET", "/pet/findByStatus"
- "GET", "/pet/findByTags"
- "POST", "/pet/{petId}"
- "DELETE", "/pet/{petId}"
- "POST", "/pet/{petId}/uploadImage"
Anonymous endpoints:
- "POST", "/store/order"
- "GET", "/store/order/{orderId}"
- "DELETE", "/store/order/{orderId}"
- "GET", "/user/login"
- "GET", "/user/{username}"
See more:
|- CMakeLists.txt // projects CMakeLists.txt
|- generated/
| |
| |- controller/ // Folder containing controllers where all endpoints are declared
| |- dto/ // DTOs are declared here
| |- service/ // Service interfaces
|
|- src/
| |
| |- service/ // Service imlementations
| |- AppComponent.hpp // Service config
| |- App.cpp // main() is here
|
|- test/ // test folder
|
|- utility/
| |
| |- install-oatpp-modules.sh // utility script to install required oatpp-modules
| |- test.sh // curl tests suite
Requires
oatpp
module installed. You may runutility/install-oatpp-modules.sh
script to install required oatpp modules.
$ mkdir build && cd build
$ cmake ..
$ make
$ ./my-project-exe # - run application.
$ docker build -t oatpp-starter .
$ docker run -p 8000:8000 -t oatpp-starter