Open sgran opened 10 months ago
It appears the problem is actually related to the use of DepositoryAccountSubtypes
. If I substitute a simple [DepositoryAccountSubtype]
for it in the schema, changing the constructor to:
request = LinkTokenCreateRequest(
client_name="myClient",
country_codes=[CountryCode("US")],
language="en",
products=[Products("auth"), Products("transactions")],
user=LinkTokenCreateRequestUser(client_user_id="1234"),
account_filters=LinkTokenAccountFilters(
depository=DepositoryFilter(
account_subtypes=[DepositoryAccountSubtype(value="CHECKING")]
)
),
auth=LinkTokenCreateRequestAuth(
instant_match_enabled=True,
),
)
the JSON serialization succeeds.
Expectation: Calling to_dict() on a model class will produce a dictionary composed of base types that can be correctly serialized to/from json.
Behaviour: Deeply nested lists appear to be incorrectly handled.
The following code:
produces the following exception: