-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
attributes and excluded_attributes are currently handle by Resources, but it would be nice if ListResponse could correctly handle the attributes and excluded_attributes parameters, in the behalf of the resources they embed.
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",
}
],
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request