Controller.hpp

This File On Github
Ask A Question

API: latest
module: oatpp-swagger
#include "oatpp-swagger/Controller.hpp"

Controller

Controller for Swagger-UI. Extends oatpp::web::server::api::ApiController.
Should be used with oatpp Simple API and multithreaded server.
For more information about integrating swagger-ui in oatpp application see oatpp-swagger module.
Exposed endpoints:

  • ENDPOINT("GET", "/api-docs/oas-3.0.0.json", api) - Server Open API Specification.
  • ENDPOINT("GET", "/swagger/ui", getUIRoot) - Server Swagger-UI. (index.html).
  • ENDPOINT("GET", "/swagger/{filename}", getUIResource) - Serve Swagger-UI resources.

namespace oatpp { namespace swagger { 
  class Controller : public oatpp::web::server::api::ApiController {}
}}

Methods

Return Type Name Summary
std::shared_ptr<Controller> createShared Create shared Controller.

Controller::createShared

Create shared Controller.

static std::shared_ptr<Controller> createShared(const std::shared_ptr<Endpoints>& endpointsList,
                                                OATPP_COMPONENT(std::shared_ptr<oatpp::swagger::DocumentInfo>, documentInfo),
                                                OATPP_COMPONENT(std::shared_ptr<oatpp::swagger::Resources>, resources))