Rusty Schema Diff
Welcome to Rusty Schema Diff, a powerful schema evolution analyzer that supports multiple schema formats including JSON Schema, OpenAPI, Protobuf, and SQL DDL. This library helps you analyze and manage schema changes across different versions, detect breaking changes, and generate migration paths.
Table of Contents
Features
- Multi-format support (JSON Schema, OpenAPI, Protobuf, SQL DDL)
- Breaking change detection
- Compatibility scoring
- Migration path generation
- Detailed change analysis
- Validation and error reporting
Installation
Add this to your Cargo.toml
:
[]
= "0.1.1"
Getting Started
Basic Usage
use ;
use Version;
// Create schema instances
let old_schema = new;
let new_schema = new;
// Analyze compatibility
let analyzer = JsonSchemaAnalyzer;
let report = analyzer.analyze_compatibility.unwrap;
println!;
println!;
Analyzing JSON Schema Changes
use *;
let analyzer = JsonSchemaAnalyzer;
let report = analyzer.analyze_compatibility.unwrap;
// Generate migration plan
let plan = analyzer.generate_migration_path.unwrap;
for step in plan.steps
Analyzing OpenAPI Changes
use *;
let analyzer = OpenApiAnalyzer;
let report = analyzer.analyze_compatibility.unwrap;
println!;
for change in report.changes.iter.filter
Analyzing SQL DDL Changes
use *;
let analyzer = SqlAnalyzer;
let report = analyzer.analyze_compatibility.unwrap;
// Generate SQL migration statements
let plan = analyzer.generate_migration_path.unwrap;
for statement in plan.steps
Documentation
For detailed information on all available analyzers and their functionality, please refer to the API Documentation.
License
This library is licensed under the MIT License. See the LICENSE file for details.