Skip to content

Commit

Permalink
Merge pull request #85 from ndsev/feature/use-zs-261
Browse files Browse the repository at this point in the history
Release 1.3.0: Compatibility with zserio>=2.6.0
  • Loading branch information
josephbirkner committed Sep 19, 2022
2 parents 6a902c1 + 1df9104 commit b3d18c8
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
11 changes: 5 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include(FetchContent)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(ZSWAG_VERSION 1.2.1)
set(ZSWAG_VERSION 1.3.0)

option(ZSWAG_BUILD_WHEELS "Enable zswag whl-output to WHEEL_DEPLOY_DIRECTORY." ON)
option(ZSWAG_KEYCHAIN_SUPPORT "Enable zswag keychain support." ON)
Expand Down Expand Up @@ -90,13 +90,12 @@ if (ZSWAG_BUILD_WHEELS AND NOT TARGET pybind11)
add_subdirectory(deps/pybind11)
endif()

if (NOT TARGET ZserioCppRuntime)
add_subdirectory(deps/zserio/compiler/extensions/cpp/runtime/src)
set(ZSERIO_REPO_ROOT "${CMAKE_CURRENT_LIST_DIR}/deps/zserio")
endif()

if (NOT TARGET zserio-cmake-helper)
set(ZSERIO_REPO_ROOT "${CMAKE_CURRENT_LIST_DIR}/deps/zserio")
add_subdirectory(deps/zserio-cmake-helper)
if (NOT TARGET ZserioCppRuntime)
add_zserio_cpp_runtime()
endif()
endif()

##############
Expand Down
2 changes: 1 addition & 1 deletion deps/zserio
Submodule zserio updated 1454 files
2 changes: 1 addition & 1 deletion deps/zserio-cmake-helper
Submodule zserio-cmake-helper updated 2 files
+74 −12 CMakeLists.txt
+20 −11 README.md
2 changes: 1 addition & 1 deletion libs/zswagcl/include/zswagcl/oaclient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class OAClient : public ::zserio::IServiceClient

std::vector<uint8_t> callMethod(
zserio::StringView methodName,
zserio::RequestData const& requestData,
zserio::IServiceData const& requestData,
void* context) override;

private:
Expand Down
3 changes: 2 additions & 1 deletion libs/zswagcl/src/oaclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <cassert>
#include "stx/format.h"
#include "zserio/ITypeInfo.h"

namespace zswagcl
{
Expand Down Expand Up @@ -111,7 +112,7 @@ ParameterValue reflectableToParameterValue(std::string const& fieldName, zserio:

std::vector<uint8_t> OAClient::callMethod(
zserio::StringView methodName,
zserio::RequestData const& requestData,
zserio::IServiceData const& requestData,
void* context)
{
if (!requestData.getReflectable()) {
Expand Down
8 changes: 4 additions & 4 deletions libs/zswagcl/test/src/oaclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ TEST_CASE("HTTP-Service", "[oaclient]") {
)json");

auto service = OAClient(config, std::move(client));
auto response = service.callMethod("multi", zserio::BasicRequestData(request.reflectable()), nullptr);
auto response = service.callMethod("multi", zserio::ServiceData(request.reflectable()), nullptr);

/* Check result */
REQUIRE(getCalled);
Expand Down Expand Up @@ -171,7 +171,7 @@ TEST_CASE("HTTP-Service", "[oaclient]") {
)json");

auto service = OAClient(config, std::move(client));
auto response = service.callMethod("q", zserio::BasicRequestData(request.reflectable()), nullptr);
auto response = service.callMethod("q", zserio::BasicServiceData(request.reflectable()), nullptr);

/* Check result */
REQUIRE(getCalled);
Expand Down Expand Up @@ -226,7 +226,7 @@ TEST_CASE("HTTP-Service", "[oaclient]") {
}
)json");
auto service = OAClient(config, std::move(client));
auto response = service.callMethod("post", zserio::BasicRequestData(request.reflectable()), nullptr);
auto response = service.callMethod("post", zserio::BasicServiceData(request.reflectable()), nullptr);

/* Check result */
REQUIRE(postCalled);
Expand All @@ -247,7 +247,7 @@ TEST_CASE("HTTP-Service", "[oaclient]") {
auto request = service_client_test::Request(
"hello", 0, std::vector<std::string>{},
service_client_test::Flat("", ""));
zserio::BasicRequestData requestData{request.reflectable()};
zserio::BasicServiceData requestData{request.reflectable()};

/* Make config, client, service */
auto config = makeConfig("", TESTDATA "/config-with-auth.json");
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ connexion
requests
zserio>=2.4.2
pyyaml
pyzswagcl>=1.2.1
pyzswagcl>=1.3.0
openapi-spec-validator

0 comments on commit b3d18c8

Please sign in to comment.