From 6d116339ce16b1cc3a178d496109f4b4355d50a9 Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Wed, 31 Aug 2022 12:57:01 -0400 Subject: [PATCH 1/3] fix: supplement singular Signed-off-by: Daniel Bluhm --- .../issue_credential/v2_0/messages/inner/supplements.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aries_cloudagent/protocols/issue_credential/v2_0/messages/inner/supplements.py b/aries_cloudagent/protocols/issue_credential/v2_0/messages/inner/supplements.py index d35c05df3f..8ec06b8d4c 100644 --- a/aries_cloudagent/protocols/issue_credential/v2_0/messages/inner/supplements.py +++ b/aries_cloudagent/protocols/issue_credential/v2_0/messages/inner/supplements.py @@ -35,13 +35,13 @@ class Meta: value = fields.Str(description="Value of attribute key value pair", required=True) -class Supplements(BaseModel): +class Supplement(BaseModel): """Model for the supplements received in issue credential message.""" class Meta: """Meta of Supplements.""" - schema_class = "SupplementsSchema" + schema_class = "SupplementSchema" def __init__( self, *, type: str, ref: str, attrs: dict, id: Optional[str] = None, **kwargs @@ -54,13 +54,13 @@ def __init__( self.attrs = attrs -class SupplementsSchema(BaseModelSchema): +class SupplementSchema(BaseModelSchema): """Supplements schema.""" class Meta: """Supplements meta.""" - model_class = Supplements + model_class = Supplement type = fields.Str( description="Type of the supplement", From 60b7eb8535322acdca0752000778aa58a84c124a Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Wed, 31 Aug 2022 13:01:37 -0400 Subject: [PATCH 2/3] fix: rename supplements.py supplement.py Signed-off-by: Daniel Bluhm --- .../v2_0/messages/inner/{supplements.py => supplement.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename aries_cloudagent/protocols/issue_credential/v2_0/messages/inner/{supplements.py => supplement.py} (100%) diff --git a/aries_cloudagent/protocols/issue_credential/v2_0/messages/inner/supplements.py b/aries_cloudagent/protocols/issue_credential/v2_0/messages/inner/supplement.py similarity index 100% rename from aries_cloudagent/protocols/issue_credential/v2_0/messages/inner/supplements.py rename to aries_cloudagent/protocols/issue_credential/v2_0/messages/inner/supplement.py From bac8db0792db4f7ddee6c2ad8e4780d9cf1f1781 Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Wed, 31 Aug 2022 13:09:35 -0400 Subject: [PATCH 3/3] fix: type hint for attrs in supplement Signed-off-by: Daniel Bluhm --- .../issue_credential/v2_0/messages/inner/supplement.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aries_cloudagent/protocols/issue_credential/v2_0/messages/inner/supplement.py b/aries_cloudagent/protocols/issue_credential/v2_0/messages/inner/supplement.py index 8ec06b8d4c..6ecf9a99a0 100644 --- a/aries_cloudagent/protocols/issue_credential/v2_0/messages/inner/supplement.py +++ b/aries_cloudagent/protocols/issue_credential/v2_0/messages/inner/supplement.py @@ -1,6 +1,6 @@ """Supplements inner model.""" -from typing import Optional +from typing import Optional, Sequence from uuid import uuid4 from marshmallow import fields, validate @@ -44,7 +44,13 @@ class Meta: schema_class = "SupplementSchema" def __init__( - self, *, type: str, ref: str, attrs: dict, id: Optional[str] = None, **kwargs + self, + *, + type: str, + ref: str, + attrs: Sequence[SupplementAttribute], + id: Optional[str] = None, + **kwargs ): """Initialize supplements.""" super().__init__(**kwargs)