From 2bb93e9d8ffca34e53cc1a25dbdcdd8093cb2c2a Mon Sep 17 00:00:00 2001 From: Danny Browning Date: Fri, 23 Feb 2024 21:09:04 -0700 Subject: [PATCH] fix: certain fields are optional --- it/docker-compose.yml | 2 +- src/api.rs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/it/docker-compose.yml b/it/docker-compose.yml index 38fd111..6990184 100644 --- a/it/docker-compose.yml +++ b/it/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: ceramic-service: - image: ceramicnetwork/js-ceramic:2.35.0-rc.0 + image: ceramicnetwork/js-ceramic:5.1.0-rc.1 volumes: - ./data:/root/.ceramic ports: diff --git a/src/api.rs b/src/api.rs index 07a9212..5fb3dbf 100644 --- a/src/api.rs +++ b/src/api.rs @@ -325,9 +325,11 @@ pub struct PageInfo { #[serde(rename_all = "camelCase")] pub struct QueryResponse { /// Edges of query + #[serde(default)] pub edges: Vec, /// Pagination info - pub page_info: PageInfo, + #[serde(default)] + pub page_info: Option, } /// Typed response to query @@ -347,7 +349,8 @@ pub struct TypedQueryResponse { /// Documents from query pub documents: Vec>, /// Pagination info - pub page_info: PageInfo, + #[serde(default)] + pub page_info: Option, } /// Healthcheck request for http api