Open azmeuk opened 4 months ago
It would be nice if ListResponse (and other subclasses of Message?) could correctly handle the attributes and excluded_attributes parameters, in the behalf of the resources they embed.
ListResponse
Message
attributes
excluded_attributes
def test_attributes_inclusion(): response = ListResponse.of(User)( resources=[ User(id="user-id", user_name="user-name", display_name="display-name") ] ) payload = response.model_dump( scim_ctx=Context.RESOURCE_QUERY_RESPONSE, attributes=["userName"] ) assert payload == { "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"], "Resources": [ { "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], "id": "user-id", "userName": "user-name", } ], }
It would be nice if
ListResponse
(and other subclasses ofMessage
?) could correctly handle theattributes
andexcluded_attributes
parameters, in the behalf of the resources they embed.