mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 19:08:52 +00:00
[C++][Pistache] Fix warnings (#3238)
* [C++][Pistache] Fix warnings Remove unecessary semicolon (Wpedantic) Remove unused parameter name (Wunused-parameter) * [C++][Pistache] Update Petstore sample
This commit is contained in:
parent
e46bd7dd18
commit
731b162942
@ -14,7 +14,7 @@ using namespace {{modelNamespace}};{{/hasModelImport}}
|
||||
|
||||
{{classname}}::{{classname}}(std::shared_ptr<Pistache::Rest::Router> 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");
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ using namespace org::openapitools::server::model;
|
||||
|
||||
PetApi::PetApi(std::shared_ptr<Pistache::Rest::Router> 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");
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ using namespace org::openapitools::server::model;
|
||||
|
||||
StoreApi::StoreApi(std::shared_ptr<Pistache::Rest::Router> 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");
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ using namespace org::openapitools::server::model;
|
||||
|
||||
UserApi::UserApi(std::shared_ptr<Pistache::Rest::Router> 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");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user