Crate rusty_schema_diff

Source
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§

Enums§

Traits§