From 9efc1ec654fe2ac1c56eed9e8a2bd4e08e437087 Mon Sep 17 00:00:00 2001 From: Brian Peiris <79419+brianpeiris@users.noreply.github.com> Date: Thu, 18 Apr 2024 10:06:15 -0400 Subject: [PATCH] Add(SCIMMY.Schemas.User): 'primary' subAttribute of 'addresses' multi-value attribute --- src/lib/schemas/user.js | 3 ++- test/lib/schemas/user.json | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/schemas/user.js b/src/lib/schemas/user.js index f4e7f5e..0252cee 100644 --- a/src/lib/schemas/user.js +++ b/src/lib/schemas/user.js @@ -64,7 +64,8 @@ export class User extends Types.Schema { new Types.Attribute("string", "region", {description: "The state or region component."}), new Types.Attribute("string", "postalCode", {description: "The zip code or postal code component."}), new Types.Attribute("string", "country", {description: "The country name component."}), - new Types.Attribute("string", "type", {canonicalValues: ["work", "home", "other"], description: "A label indicating the attribute's function, e.g. 'work' or 'home'."}) + new Types.Attribute("string", "type", {canonicalValues: ["work", "home", "other"], description: "A label indicating the attribute's function, e.g. 'work' or 'home'."}), + new Types.Attribute("boolean", "primary", {description: "A Boolean value indicating the 'primary' or preferred attribute value for this attribute, e.g. the preferred mailing address or primary email address. The primary attribute value 'true' MUST appear no more than once."}) ]), new Types.Attribute("complex", "groups", {direction: "out", mutable: false, multiValued: true, uniqueness: false, description: "A list of groups to which the user belongs, either through direct membership, through nested groups, or dynamically calculated."}, [ new Types.Attribute("string", "value", {direction: "out", mutable: false, description: "The identifier of the User's group."}), diff --git a/test/lib/schemas/user.json b/test/lib/schemas/user.json index 39d5ee2..5fe42c4 100644 --- a/test/lib/schemas/user.json +++ b/test/lib/schemas/user.json @@ -235,6 +235,10 @@ "name": "type", "type": "string", "multiValued": false, "required": false, "caseExact": false, "canonicalValues": ["work", "home", "other"], "mutability": "readWrite", "returned": "default", "uniqueness": "none", "description": "A label indicating the attribute's function, e.g. 'work' or 'home'." + }, + { + "name": "primary", "type": "boolean", "multiValued": false, "required": false, "mutability": "readWrite", "returned": "default", + "description": "A Boolean value indicating the 'primary' or preferred attribute value for this attribute, e.g. the preferred mailing address or primary email address. The primary attribute value 'true' MUST appear no more than once." } ] },