[cpp-pistache-server]: Fix build with pistache master branch (#10829)

* fix(cpp-pistache-server): meson/cmake build

* fix(cpp-pistache-server): Upgrade to C++17 and use std::optional

* feat(cpp-pistache-server): Disable running tests during build of nlohmann/json

* feat(samples): Update server/petstore/cpp-pistache
This commit is contained in:
sheabot
2021-11-13 19:15:42 -07:00
committed by GitHub
parent 70737fb1e6
commit f2fcff2945
18 changed files with 60 additions and 58 deletions

View File

@@ -27,13 +27,13 @@ PetApiImpl::PetApiImpl(const std::shared_ptr<Pistache::Rest::Router>& rtr)
void PetApiImpl::add_pet(const Pet &body, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
}
void PetApiImpl::delete_pet(const int64_t &petId, const Pistache::Optional<Pistache::Http::Header::Raw> &apiKey, Pistache::Http::ResponseWriter &response) {
void PetApiImpl::delete_pet(const int64_t &petId, const std::optional<Pistache::Http::Header::Raw> &apiKey, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
}
void PetApiImpl::find_pets_by_status(const Pistache::Optional<std::vector<std::string>> &status, Pistache::Http::ResponseWriter &response) {
void PetApiImpl::find_pets_by_status(const std::optional<std::vector<std::string>> &status, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
}
void PetApiImpl::find_pets_by_tags(const Pistache::Optional<std::vector<std::string>> &tags, Pistache::Http::ResponseWriter &response) {
void PetApiImpl::find_pets_by_tags(const std::optional<std::vector<std::string>> &tags, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
}
void PetApiImpl::get_pet_by_id(const int64_t &petId, Pistache::Http::ResponseWriter &response) {