/** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /* * StoreApi.h * * */ #ifndef StoreApi_H_ #define StoreApi_H_ #include "oatpp/web/server/api/ApiController.hpp" #include "oatpp/core/macro/codegen.hpp" #include "oatpp/core/macro/component.hpp" #include "oatpp/core/Types.hpp" #include "Order.hpp" #include OATPP_CODEGEN_BEGIN(ApiController) ///< Begin ApiController codegen section namespace org::openapitools::server::api { class StoreApi : public oatpp::web::server::api::ApiController { public: StoreApi(OATPP_COMPONENT(std::shared_ptr, objectMapper) /* Inject object mapper */) : oatpp::web::server::api::ApiController(objectMapper) {} /// /// Delete purchase order by ID /// /// /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// /// HTTP Request /// ID of the order that needs to be deleted virtual std::shared_ptr delete_order(const std::shared_ptr &request, const oatpp::String &orderId) = 0; ENDPOINT("DELETE", "/store/order/{orderId}", delete_order_handler, REQUEST(std::shared_ptr, request), PATH(oatpp::String, orderId)) { return delete_order(request, orderId); } /// /// Returns pet inventories by status /// /// /// Returns a map of status codes to quantities /// /// HTTP Request virtual std::shared_ptr get_inventory(const std::shared_ptr &request) = 0; ENDPOINT("GET", "/store/inventory", get_inventory_handler, REQUEST(std::shared_ptr, request)) { return get_inventory(request); } /// /// Find purchase order by ID /// /// /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// HTTP Request /// ID of pet that needs to be fetched virtual std::shared_ptr get_order_by_id(const std::shared_ptr &request, const oatpp::Int64 &orderId) = 0; ENDPOINT("GET", "/store/order/{orderId}", get_order_by_id_handler, REQUEST(std::shared_ptr, request), PATH(oatpp::Int64, orderId)) { return get_order_by_id(request, orderId); } /// /// Place an order for a pet /// /// /// /// /// HTTP Request /// order placed for purchasing the pet virtual std::shared_ptr place_order(const std::shared_ptr &request, const oatpp::Object &order) = 0; ENDPOINT("POST", "/store/order", place_order_handler, REQUEST(std::shared_ptr, request), BODY_DTO(oatpp::Object, order)) { return place_order(request, order); } }; #include OATPP_CODEGEN_END(ApiController) ///< End ApiController codegen section } // namespace org::openapitools::server::api #endif /* StoreApi_H_ */