[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

@@ -24,10 +24,10 @@
#include <pistache/http.h>
#include <pistache/router.h>
#include <memory>
#include <optional>
#include <PetApi.h>
#include <pistache/optional.h>
#include "ApiResponse.h"
#include "Pet.h"
@@ -44,9 +44,9 @@ public:
~PetApiImpl() override = default;
void add_pet(const Pet &body, Pistache::Http::ResponseWriter &response);
void delete_pet(const int64_t &petId, const Pistache::Optional<Pistache::Http::Header::Raw> &apiKey, Pistache::Http::ResponseWriter &response);
void find_pets_by_status(const Pistache::Optional<std::vector<std::string>> &status, Pistache::Http::ResponseWriter &response);
void find_pets_by_tags(const Pistache::Optional<std::vector<std::string>> &tags, Pistache::Http::ResponseWriter &response);
void delete_pet(const int64_t &petId, const std::optional<Pistache::Http::Header::Raw> &apiKey, Pistache::Http::ResponseWriter &response);
void find_pets_by_status(const std::optional<std::vector<std::string>> &status, Pistache::Http::ResponseWriter &response);
void find_pets_by_tags(const std::optional<std::vector<std::string>> &tags, Pistache::Http::ResponseWriter &response);
void get_pet_by_id(const int64_t &petId, Pistache::Http::ResponseWriter &response);
void update_pet(const Pet &body, Pistache::Http::ResponseWriter &response);
void update_pet_with_form(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter &response);