Class: SCIMMY.Types.SchemaDefinition
SCIM Schema Definition Type
Description
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) → {~SchemaDescription}
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
attribute(name) → {SCIMMY.Types.Attribute|SCIMMY.Types.SchemaDefinition}
Find an attribute or extension instance belonging to the schema definition by its name
Parameters:
Name | Type | Description |
---|---|---|
name
|
String
|
the name of the attribute to look for (namespaced or direct) |
Returns:
the Attribute or SchemaDefinition instance with matching name
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
|
|
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, filteropt) → {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
|
|
whether to check for inbound, outbound, or bidirectional attributes |
basepathopt
|
String
|
|
the URI representing the resource type's location |
filteropt
|
SCIMMY.Types.Filter
|
|
the attribute filters to apply to the coerced value |
Returns:
the coerced value, conforming to all schema attributes' characteristics
Type Definitions
SchemaDescription
- Type:
- {Object}
Properties:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
schemas
|
String[]
|
URN namespaces that identify the type of resource being described |
|||||||||
id
|
String
|
URN namespace of the SCIM schema definition |
|||||||||
name
|
String
|
friendly name of the SCIM schema definition |
|||||||||
description
|
String
|
human-readable description of the SCIM schema definition |
|||||||||
attributes
|
~AttributeDefinition[]
|
attributes that make up this schema |
|||||||||
meta
|
Object
|
metadata details of this schema Properties
|