I want work email attribute to be globally unique. How do I define that in schema definition?
{
"name" : "emails",
"type" : "complex",
"multiValued" : true,
"description" : "...",
"required" : true,
"subAttributes" : [
{
"name" : "value",
"type" : "string",
"multiValued" : false,
"description" : "...",
"required" : true,
"caseExact" : false,
"mutability" : "readWrite",
"returned" : "default",
"uniqueness" : "global" <-- applicable only if type is 'work'
},
...
You can't. There are limitations to what can be represented in the SCIM JSON schema format, one of which has to do with conditional properties like this - "the value is unique IF type is work".
The best you can do is to mention it in your documentation and/or in the "Description" attribute on the schema object for "emails".