Expand description
Schema definitions and validation for SCIM resources.
This module provides the schema registry and validation engine for SCIM resources, implementing the core User schema as defined in RFC 7643 with comprehensive validation capabilities.
§Organization
The schema module is organized into several sub-modules:
types- Core schema data structures (Schema, AttributeDefinition, etc.)registry- Schema registry for loading and managing schemasvalidation- Comprehensive validation logic for SCIM resourcestests- Test cases for schema functionality
§Usage
use scim_server::schema::{SchemaRegistry, OperationContext};
use serde_json::json;
// Create a schema registry
let registry = SchemaRegistry::new()?;
// Validate a SCIM resource
let user = json!({
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName": "jdoe@example.com"
});
registry.validate_json_resource_with_context("User", &user, OperationContext::Create)?;Re-exports§
pub use registry::SchemaRegistry;pub use types::AttributeDefinition;pub use types::AttributeType;pub use types::Mutability;pub use types::Schema;pub use types::Uniqueness;pub use validation::OperationContext;
Modules§
- registry
- Schema registry for loading, managing, and accessing SCIM schemas.
- types
- Core schema type definitions for SCIM resources.
- validation
- Schema validation logic for SCIM resources.