Skip to content

lganzzzo/oatpp-swagger-with-async-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oatpp-swagger with Async APIs

Simple example how to document Async-Controller endpoints with Swagger-UI

More about oat++:

Overview

Project layout

|- CMakeLists.txt                        // projects CMakeLists.txt
|- src/
|    |
|    |- controller/                      // Folder containing controller where all endpoints are declared
|    |- dto/                             // DTOs are declared here
|    |- SwaggerComponent.hpp             // General info for Swagger
|    |- AppComponent.hpp                 // Service config
|    |- Logger.hpp                       // Application Logger
|    |- App.cpp                          // main() is here
|
|- test/                                 // test folder
|- utility/install-oatpp-modules.sh      // utility script to install required oatpp-modules.
    

Build and Run

Using CMake

Requires

  • oatpp and oatpp-swagger modules installed. You may run utility/install-oatpp-modules.sh script to install required oatpp modules.
$ mkdir build && cd build
$ cmake ..
$ make 
$ ./example-async-api-exe       # - run application.

In Docker

$ docker build -t example-async-api .
$ docker run -p 8000:8000 -t example-async-api

Swagger-UI

Swagger-UI endpoint - http://localhost:8000/swagger/ui.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published