Open
Description
🚀 Description
The PatchOp model currently allows inputs that do not conform strictly to the SCIM specification. This can lead to unexpected behavior or unvalidated data being processed.
⚙️ Current Behavior
Input:
>>> patch_instance = PatchOp.model_validate(dict(schemas=["abcd1234", "1234abcd"]))
>>> patch_instance.schemas
Output:
['abcd1234', '1234abcd']
⚠️ Issues
- The schemas field accepts any list of strings and doesn't enforce the exact expected value.
- The operations field is optional and allows None or an empty list, which should not be valid.
🚩 Expected Behavior
- schemas should strictly equal ["urn:ietf:params:scim:api:messages:2.0:PatchOp"].
- operations should be a required field and must contain at least one PatchOperation item.