-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Copy link
Description
scim2-models supports defining multi-valued primitive fields on extensions (e.g., list[str] | None), and the tutorial documents this as valid. However, scim2-server's PATCH operators crash when processing these fields because parse_new_value and model_validate_from_dict assume the field's root type is always a BaseModel subclass.
Reproduction:
Define an extension with a multi-valued primitive:
class MyExtension(Extension):
tags: list[str] | None = NonePATCH replace with a list of strings:
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{
"op": "replace",
"path": "urn:example:schemas:MyExtension:tags",
"value": ["tag1", "tag2"]
}
]
} Result: 400 invalidValue
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels