/** * 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. */ /* * PetApi.h * * */ #ifndef PetApi_H_ #define PetApi_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 "ApiResponse.hpp" #include "Pet.hpp" #include OATPP_CODEGEN_BEGIN(ApiController) ///< Begin ApiController codegen section namespace org::openapitools::server::api { class PetApi : public oatpp::web::server::api::ApiController { public: PetApi(OATPP_COMPONENT(std::shared_ptr, objectMapper) /* Inject object mapper */) : oatpp::web::server::api::ApiController(objectMapper) {} /// /// Add a new pet to the store /// /// /// /// /// HTTP Request /// Pet object that needs to be added to the store virtual std::shared_ptr add_pet(const std::shared_ptr &request, const oatpp::Object &pet) = 0; ENDPOINT("POST", "/pet", add_pet_handler, REQUEST(std::shared_ptr, request), BODY_DTO(oatpp::Object, pet)) { return add_pet(request, pet); } /// /// Deletes a pet /// /// /// /// /// HTTP Request /// Pet id to delete /// (optional, default to "") virtual std::shared_ptr delete_pet(const std::shared_ptr &request, const oatpp::Int64 &petId, const oatpp::String &apiKey) = 0; ENDPOINT("DELETE", "/pet/{petId}", delete_pet_handler, REQUEST(std::shared_ptr, request), PATH(oatpp::Int64, petId), HEADER(oatpp::String, apiKey, "apiKey")) { return delete_pet(request, petId, apiKey); } /// /// Finds Pets by status /// /// /// Multiple status values can be provided with comma separated strings /// /// HTTP Request /// Status values that need to be considered for filter virtual std::shared_ptr find_pets_by_status(const std::shared_ptr &request, const oatpp::Vector &status) = 0; ENDPOINT("GET", "/pet/findByStatus", find_pets_by_status_handler, REQUEST(std::shared_ptr, request), QUERY(oatpp::Vector, status)) { return find_pets_by_status(request, status); } /// /// Finds Pets by tags /// /// /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. /// /// HTTP Request /// Tags to filter by virtual std::shared_ptr find_pets_by_tags(const std::shared_ptr &request, const oatpp::Vector &tags) = 0; ENDPOINT("GET", "/pet/findByTags", find_pets_by_tags_handler, REQUEST(std::shared_ptr, request), QUERY(oatpp::Vector, tags)) { return find_pets_by_tags(request, tags); } /// /// Find pet by ID /// /// /// Returns a single pet /// /// HTTP Request /// ID of pet to return virtual std::shared_ptr get_pet_by_id(const std::shared_ptr &request, const oatpp::Int64 &petId) = 0; ENDPOINT("GET", "/pet/{petId}", get_pet_by_id_handler, REQUEST(std::shared_ptr, request), PATH(oatpp::Int64, petId)) { return get_pet_by_id(request, petId); } /// /// Update an existing pet /// /// /// /// /// HTTP Request /// Pet object that needs to be added to the store virtual std::shared_ptr update_pet(const std::shared_ptr &request, const oatpp::Object &pet) = 0; ENDPOINT("PUT", "/pet", update_pet_handler, REQUEST(std::shared_ptr, request), BODY_DTO(oatpp::Object, pet)) { return update_pet(request, pet); } /// /// Updates a pet in the store with form data /// /// /// /// /// HTTP Request /// ID of pet that needs to be updated virtual std::shared_ptr update_pet_with_form(const std::shared_ptr &request, const oatpp::Int64 &petId) = 0; ENDPOINT("POST", "/pet/{petId}", update_pet_with_form_handler, REQUEST(std::shared_ptr, request), PATH(oatpp::Int64, petId)) { return update_pet_with_form(request, petId); } /// /// uploads an image /// /// /// /// /// HTTP Request /// ID of pet to update virtual std::shared_ptr upload_file(const std::shared_ptr &request, const oatpp::Int64 &petId) = 0; ENDPOINT("POST", "/pet/{petId}/uploadImage", upload_file_handler, REQUEST(std::shared_ptr, request), PATH(oatpp::Int64, petId)) { return upload_file(request, petId); } }; #include OATPP_CODEGEN_END(ApiController) ///< End ApiController codegen section } // namespace org::openapitools::server::api #endif /* PetApi_H_ */