Class: SCIMMY.Types.Schema
SCIM Schema Type
Description
Summary:
- Extendable class which provides the ability to construct resource instances with automated validation of conformity to a resource's schema definition.
- Once instantiated, any modifications will also be validated against the attached schema definition's matching attribute configuration (e.g. for mutability or canonical values).
Usage
Construct a resource instance after verifying schema compatibility
new SCIMMY.Types.Schema(data, directionopt)
- Source:
- src/lib/types/schema.js, line 34
Parameters:
Name | Type | Default | Description |
---|---|---|---|
data
|
Object |
the source data to feed through the schema definition |
|
directionopt
|
String | "both" |
whether the resource is inbound from a request or outbound for a response |
Members
(abstract, static) definition: SCIMMY.Types.SchemaDefinition
Retrieves a schema's definition instance
- Type:
- {SCIMMY.Types.SchemaDefinition}
- Source:
- src/lib/types/schema.js, line 40
Methods
(static) extend(extension, requiredopt)
Extend a schema by mixing in other schemas or attributes
- Source:
- src/lib/types/schema.js, line 57
Parameters:
Name | Type | Default | Description |
---|---|---|---|
extension
|
SCIMMY.Types.Schema|SCIMMY.Types.Attribute[] |
the schema extensions or collection of attributes to register |
|
requiredopt
|
Boolean | false |
if the extension is a schema, whether the extension is required |
(static) truncate(attributes)
Remove an attribute, schema extension, or subAttribute from the schema's definition
- Source:
- src/lib/types/schema.js, line 69
Parameters:
Name | Type | Description |
---|---|---|
attributes
|
SCIMMY.Types.Schema|String|SCIMMY.Types.Attribute|(String|SCIMMY.Types.Attribute)[] |
the child attributes to remove from the schema definition |