Describe the bug
Our users have no "metadata_public", so when we do "to_session" call we receive back "metadata_public":null
Python Client fails as it is expecting Dict in return.
Looks as "metadata_public" and "metadata_admin" have to be declared as "traits" in the:
https://github.com/ory/client-python/blob/master/ory_client/model/identity.py
Current version:
'traits': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
'metadata_admin': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501
'metadata_public': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501
Should be:
'traits': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
'metadata_admin': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
'metadata_public': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
Possible it have to be done on level of schema to apply automatically to all the future client recreation.
Reproducing the bug
Using ory-client==0.2.0a60 make request "to_session"
Relevant log output
ory_client.exceptions.ApiTypeError: Invalid type for variable 'metadata_public'. Required value type is dict and passed type was NoneType at ['received_data']['identity']['metadata_public']