python-scim / scim2-models

SCIM resources serialization and validation with Pydantic
https://scim2-models.readthedocs.io
Apache License 2.0
11 stars 3 forks source link

Pydantic warnings when serializing `ListResponse`s with mixed types #61

Closed ccoors closed 3 months ago

ccoors commented 3 months ago

For example when running the tests in this repo:

$ 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)