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§
- Re-exports of commonly used types
Structs§
- Represents compatibility analysis results
- Analyzes JSON Schema changes and generates compatibility reports.
- Represents a plan for migrating between schema versions
- Analyzes OpenAPI changes and generates compatibility reports.
- Analyzes Protobuf changes and generates compatibility reports.
- Analyzes SQL DDL changes and generates compatibility reports.
- Represents validation results for schema changes
Enums§
- Represents errors that can occur during schema analysis operations
Traits§
- Core trait for implementing schema analyzers