$ poetry run pytest
[...]
tests/test_list_response.py::test_mixed_types
/home/ccoors/dev/scim2-models/scim2_models/base.py:568: UserWarning: Pydantic serializer warnings:
Expected `Union[wrap_function[model_serializer_exclude_none, User], wrap_function[model_serializer_exclude_none, Group]]` but got `User` - serialized value may not be as expected
value = handler(value)
For example when running the tests in this repo: