diff --git a/g2p_bank_rest_api/schemas/group_membership.py b/g2p_bank_rest_api/schemas/group_membership.py index 46dc19b5..e54da99e 100644 --- a/g2p_bank_rest_api/schemas/group_membership.py +++ b/g2p_bank_rest_api/schemas/group_membership.py @@ -6,4 +6,4 @@ class GroupMembersInfoRequest( group_membership.GroupMembersInfoRequest, extends=group_membership.GroupMembersInfoRequest ): - bank_ids: list[bank_details.BankDetailsRequest] | None + bank_ids: list[bank_details.BankDetailsRequest] | None = None diff --git a/g2p_registry_rest_api/schemas/group.py b/g2p_registry_rest_api/schemas/group.py index 4a1dc852..9bbc2fb2 100644 --- a/g2p_registry_rest_api/schemas/group.py +++ b/g2p_registry_rest_api/schemas/group.py @@ -17,6 +17,6 @@ class GroupInfoResponse(RegistrantInfoResponse): class GroupInfoRequest(RegistrantInfoRequest): is_group: bool = True - members: list[GroupMembersInfoRequest] - kind: str | None - is_partial_group: bool | None + members: list[GroupMembersInfoRequest] = [] + kind: str | None = None + is_partial_group: bool | None = None diff --git a/g2p_registry_rest_api/schemas/group_membership.py b/g2p_registry_rest_api/schemas/group_membership.py index f06b2585..a1ca4b54 100644 --- a/g2p_registry_rest_api/schemas/group_membership.py +++ b/g2p_registry_rest_api/schemas/group_membership.py @@ -1,8 +1,7 @@ -from datetime import date, datetime +from datetime import datetime -from .individual import IndividualInfoResponse +from .individual import IndividualInfoRequest, IndividualInfoResponse from .naive_orm_model import NaiveOrmModel -from .registrant import PhoneNumberRequest, RegistrantIDRequest class GroupMembershipKindInfo(NaiveOrmModel): @@ -17,18 +16,5 @@ class GroupMembersInfoResponse(NaiveOrmModel): write_date: datetime = None -class GroupMembersInfoRequest(NaiveOrmModel): - name: str - given_name: str = None - addl_name: str = None - family_name: str = None - ids: list[RegistrantIDRequest] = None - registration_date: date = None - phone_numbers: list[PhoneNumberRequest] = None - email: str | None - address: str | None - gender: str | None - birthdate: date = None - birth_place: str | None - is_group: bool = False +class GroupMembersInfoRequest(IndividualInfoRequest): kind: list[GroupMembershipKindInfo] = None # TODO: Would be nicer to have it as a list of str