Class: SCIMMY.Types.SchemaDefinition

SCIM Schema Definition Type

Summary:
  • Defines an underlying SCIM schema definition, containing the schema's URN namespace, friendly name, description, and collection of attributes that make up the schema.
  • Provides a way to ensure all properties of a resource conform to their attribute definitions, as well as enabling JSON expression of schemas for consumption by other SCIM clients or service providers.

Usage

Constructs an instance of a full SCIM schema definition

                    
                        new SCIMMY.Types.SchemaDefinition(name, id, descriptionopt, attributesopt)
                    
                
Parameters:
Name Type Default Description
name String

friendly name of the SCIM schema

id String

URN namespace of the SCIM schema

descriptionopt String ""

a human-readable description of the schema

attributesopt SCIMMY.Types.Attribute[] []

attributes that make up the schema

Properties:
Name Type Description
name String

friendly name of the SCIM schema

id String

URN namespace of the SCIM schema

description String

human-readable description of the schema

attributes SCIMMY.Types.Attribute[]

attributes that make up the schema

Methods

describe(basepathopt) → {Object}

Get the SCIM schema definition for consumption by clients

Parameters:
Name Type Default Description
basepathopt String ""

the base path for the schema's meta.location property

Returns:

the schema definition for consumption by clients

Type:
{Object}

extend(extension, requiredopt) → {SCIMMY.Types.SchemaDefinition}

Extend a schema definition instance by mixing in other schemas or attributes

Parameters:
Name Type Default Description
extension SCIMMY.Types.SchemaDefinition|SCIMMY.Types.Attribute[]

the schema extension or collection of attributes to register

requiredopt Boolean false

if the extension is a schema, whether the extension is required

Returns:

this schema definition instance for chaining

truncate(…target) → {SCIMMY.Types.SchemaDefinition}

Remove an attribute, extension schema, or subAttribute from a schema or attribute definition

Parameters:
Name Type Description
…target String

the name, or names, of attributes to remove from the schema definition

SCIMMY.Types.Attribute

the attribute instance, or instances, to remove from the schema definition

SCIMMY.Types.SchemaDefinition

the extension schema, or schemas, to remove from the schema definition

Returns:

this schema definition instance for chaining

coerce(data, directionopt, basepathopt, filtersopt) → {Object}

Coerce a given value by making sure it conforms to all schema attributes' characteristics

Parameters:
Name Type Default Description
data Object

value to coerce and confirm conformity of properties to schema attributes' characteristics

directionopt String "both"

whether to check for inbound, outbound, or bidirectional attributes

basepathopt String

the URI representing the resource type's location

filtersopt SCIMMY.Types.Filter

the attribute filters to apply to the coerced value

Returns:

the coerced value, conforming to all schema attributes' characteristics

Type:
{Object}