Expand description
Rusty Schema Diff - A library for analyzing and managing schema evolution
This library provides tools to analyze and manage schema changes across different versions of data structures, APIs, and database schemas. It supports multiple schema formats including JSON Schema, Protobuf, OpenAPI, and SQL DDL.
§Features
- Schema compatibility analysis
- Migration path generation
- Breaking change detection
- Multi-format support
§Example
use rusty_schema_diff::{Schema, SchemaFormat, JsonSchemaAnalyzer, SchemaAnalyzer};
let old_schema = Schema::new(
SchemaFormat::JsonSchema,
r#"{"type": "object"}"#.to_string(),
"1.0.0".parse().unwrap()
);
let new_schema = Schema::new(
SchemaFormat::JsonSchema,
r#"{"type": "object", "required": ["id"]}"#.to_string(),
"1.1.0".parse().unwrap()
);
let analyzer = JsonSchemaAnalyzer;
let report = analyzer.analyze_compatibility(&old_schema, &new_schema).unwrap();
println!("Compatible: {}", report.is_compatible);
Modules§
- prelude
- Re-exports of commonly used types
Structs§
- Compatibility
Report - Represents compatibility analysis results
- Json
Schema Analyzer - Analyzes JSON Schema changes and generates compatibility reports.
- Migration
Plan - Represents a plan for migrating between schema versions
- Open
ApiAnalyzer - Analyzes OpenAPI changes and generates compatibility reports.
- Protobuf
Analyzer - Analyzes Protobuf changes and generates compatibility reports.
- Schema
- SqlAnalyzer
- Analyzes SQL DDL changes and generates compatibility reports.
- Validation
Result - Represents validation results for schema changes
Enums§
- Schema
Diff Error - Represents errors that can occur during schema analysis operations
- Schema
Format
Traits§
- Schema
Analyzer - Core trait for implementing schema analyzers