From 127074efb4dfe780cab17c18a6b3c57eea4c717d Mon Sep 17 00:00:00 2001 From: ff137 Date: Wed, 5 Jun 2024 13:28:25 +0300 Subject: [PATCH] :art: fix marshmallow warning Signed-off-by: ff137 --- aries_cloudagent/messaging/models/paginated_query.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aries_cloudagent/messaging/models/paginated_query.py b/aries_cloudagent/messaging/models/paginated_query.py index 792dcd5321..bc05b1448e 100644 --- a/aries_cloudagent/messaging/models/paginated_query.py +++ b/aries_cloudagent/messaging/models/paginated_query.py @@ -12,7 +12,7 @@ class PaginatedQuerySchema(OpenAPISchema): limit = fields.Int( required=False, - missing=DEFAULT_PAGE_SIZE, + load_default=DEFAULT_PAGE_SIZE, validate=lambda x: x > 0 and x <= MAXIMUM_PAGE_SIZE, metadata={"description": "Number of results to return", "example": 50}, error_messages={ @@ -24,7 +24,7 @@ class PaginatedQuerySchema(OpenAPISchema): ) offset = fields.Int( required=False, - missing=0, + load_default=0, validate=lambda x: x >= 0, metadata={"description": "Offset for pagination", "example": 0}, error_messages={"validator_failed": "Value must be 0 or greater"},