diff --git a/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-source.mustache b/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-source.mustache index cfb88ec33158..4e35d5f863e8 100644 --- a/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-source.mustache @@ -14,7 +14,7 @@ using namespace {{modelNamespace}};{{/hasModelImport}} {{classname}}::{{classname}}(std::shared_ptr rtr) { router = rtr; -}; +} void {{classname}}::init() { setupRoutes(); @@ -32,7 +32,7 @@ void {{classname}}::setupRoutes() { } {{#operation}} -void {{classname}}::{{operationIdSnakeCase}}_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { +void {{classname}}::{{operationIdSnakeCase}}_handler(const Pistache::Rest::Request &{{#hasParams}}request{{/hasParams}}, Pistache::Http::ResponseWriter response) { {{#vendorExtensions.x-codegen-pistache-isParsingSupported}} {{#hasPathParams}} // Getting the path params @@ -92,7 +92,7 @@ void {{classname}}::{{operationIdSnakeCase}}_handler(const Pistache::Rest::Reque } {{/operation}} -void {{classname}}::{{classnameSnakeLowerCase}}_default_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { +void {{classname}}::{{classnameSnakeLowerCase}}_default_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { response.send(Pistache::Http::Code::Not_Found, "The requested method does not exist"); } diff --git a/samples/server/petstore/cpp-pistache/api/PetApi.cpp b/samples/server/petstore/cpp-pistache/api/PetApi.cpp index 2dcf3b1434b8..32d47377c657 100644 --- a/samples/server/petstore/cpp-pistache/api/PetApi.cpp +++ b/samples/server/petstore/cpp-pistache/api/PetApi.cpp @@ -23,7 +23,7 @@ using namespace org::openapitools::server::model; PetApi::PetApi(std::shared_ptr rtr) { router = rtr; -}; +} void PetApi::init() { setupRoutes(); @@ -201,7 +201,7 @@ void PetApi::upload_file_handler(const Pistache::Rest::Request &request, Pistach } -void PetApi::pet_api_default_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { +void PetApi::pet_api_default_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { response.send(Pistache::Http::Code::Not_Found, "The requested method does not exist"); } diff --git a/samples/server/petstore/cpp-pistache/api/StoreApi.cpp b/samples/server/petstore/cpp-pistache/api/StoreApi.cpp index b9ae6c1d58f3..d1133877736a 100644 --- a/samples/server/petstore/cpp-pistache/api/StoreApi.cpp +++ b/samples/server/petstore/cpp-pistache/api/StoreApi.cpp @@ -23,7 +23,7 @@ using namespace org::openapitools::server::model; StoreApi::StoreApi(std::shared_ptr rtr) { router = rtr; -}; +} void StoreApi::init() { setupRoutes(); @@ -58,7 +58,7 @@ void StoreApi::delete_order_handler(const Pistache::Rest::Request &request, Pist } } -void StoreApi::get_inventory_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { +void StoreApi::get_inventory_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { try { this->get_inventory(response); @@ -111,7 +111,7 @@ void StoreApi::place_order_handler(const Pistache::Rest::Request &request, Pista } -void StoreApi::store_api_default_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { +void StoreApi::store_api_default_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { response.send(Pistache::Http::Code::Not_Found, "The requested method does not exist"); } diff --git a/samples/server/petstore/cpp-pistache/api/UserApi.cpp b/samples/server/petstore/cpp-pistache/api/UserApi.cpp index 76846eb5ec64..51889d55043b 100644 --- a/samples/server/petstore/cpp-pistache/api/UserApi.cpp +++ b/samples/server/petstore/cpp-pistache/api/UserApi.cpp @@ -23,7 +23,7 @@ using namespace org::openapitools::server::model; UserApi::UserApi(std::shared_ptr rtr) { router = rtr; -}; +} void UserApi::init() { setupRoutes(); @@ -170,7 +170,7 @@ void UserApi::login_user_handler(const Pistache::Rest::Request &request, Pistach } } -void UserApi::logout_user_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { +void UserApi::logout_user_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { try { this->logout_user(response); @@ -208,7 +208,7 @@ void UserApi::update_user_handler(const Pistache::Rest::Request &request, Pistac } -void UserApi::user_api_default_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { +void UserApi::user_api_default_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { response.send(Pistache::Http::Code::Not_Found, "The requested method does not exist"); }