{"id":22897387,"url":"https://github.com/rusty-libraries/rusty-schema-diff","last_synced_at":"2025-04-15T02:52:16.000Z","repository":{"id":267593148,"uuid":"901741091","full_name":"rusty-libraries/rusty-schema-diff","owner":"rusty-libraries","description":"A powerful schema evolution analyzer supporting JSON Schema, OpenAPI, Protobuf, and SQL DDL","archived":false,"fork":false,"pushed_at":"2024-12-14T04:24:26.000Z","size":31,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-15T02:52:10.579Z","etag":null,"topics":["diff","openapi","protobuf","schema","sql"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rusty-libraries.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-11T08:23:59.000Z","updated_at":"2024-12-29T21:39:15.000Z","dependencies_parsed_at":"2024-12-11T08:49:54.573Z","dependency_job_id":"62757a41-d39e-4aaf-b3a0-655ffe449afe","html_url":"https://github.com/rusty-libraries/rusty-schema-diff","commit_stats":null,"previous_names":["rusty-libraries/rusty-schema-diff"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rusty-libraries%2Frusty-schema-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rusty-libraries%2Frusty-schema-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rusty-libraries%2Frusty-schema-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rusty-libraries%2Frusty-schema-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rusty-libraries","download_url":"https://codeload.github.com/rusty-libraries/rusty-schema-diff/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997086,"owners_count":21195797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["diff","openapi","protobuf","schema","sql"],"created_at":"2024-12-14T00:17:09.259Z","updated_at":"2025-04-15T02:52:15.972Z","avatar_url":"https://github.com/rusty-libraries.png","language":"Rust","readme":"# Rusty Schema Diff\n\n![Crates.io](https://img.shields.io/crates/v/rusty-schema-diff) ![docs.rs](https://img.shields.io/docsrs/rusty-schema-diff) ![License](https://img.shields.io/crates/l/rusty-schema-diff)\n\nWelcome 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.\n\n## Table of Contents\n\n- [Rusty Schema Diff](#rusty-schema-diff)\n  - [Table of Contents](#table-of-contents)\n  - [Features](#features)\n  - [Installation](#installation)\n  - [Getting Started](#getting-started)\n    - [Basic Usage](#basic-usage)\n    - [Analyzing JSON Schema Changes](#analyzing-json-schema-changes)\n    - [Analyzing OpenAPI Changes](#analyzing-openapi-changes)\n    - [Analyzing SQL DDL Changes](#analyzing-sql-ddl-changes)\n  - [Documentation](#documentation)\n  - [License](#license)\n\n## Features\n\n- Multi-format support (JSON Schema, OpenAPI, Protobuf, SQL DDL)\n- Breaking change detection\n- Compatibility scoring\n- Migration path generation\n- Detailed change analysis\n- Validation and error reporting\n\n## Installation\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nrusty-schema-diff = \"0.1.1\"\n```\n\n## Getting Started\n\n### Basic Usage\n\n```rust\nuse rusty_schema_diff::{Schema, SchemaFormat, JsonSchemaAnalyzer, SchemaAnalyzer};\nuse semver::Version;\n\n// Create schema instances\nlet old_schema = Schema::new(\n    SchemaFormat::JsonSchema,\n    r#\"{\"type\": \"object\", \"properties\": {\"name\": {\"type\": \"string\"}}}\"#.to_string(),\n    Version::parse(\"1.0.0\").unwrap()\n);\n\nlet new_schema = Schema::new(\n    SchemaFormat::JsonSchema,\n    r#\"{\"type\": \"object\", \"properties\": {\"name\": {\"type\": \"string\"}, \"age\": {\"type\": \"integer\"}}}\"#.to_string(),\n    Version::parse(\"1.1.0\").unwrap()\n);\n\n// Analyze compatibility\nlet analyzer = JsonSchemaAnalyzer;\nlet report = analyzer.analyze_compatibility(\u0026old_schema, \u0026new_schema).unwrap();\n\nprintln!(\"Compatible: {}\", report.is_compatible);\nprintln!(\"Score: {}\", report.compatibility_score);\n```\n\n### Analyzing JSON Schema Changes\n\n```rust\nuse rusty_schema_diff::prelude::*;\n\nlet analyzer = JsonSchemaAnalyzer;\nlet report = analyzer.analyze_compatibility(\u0026old_schema, \u0026new_schema).unwrap();\n\n// Generate migration plan\nlet plan = analyzer.generate_migration_path(\u0026old_schema, \u0026new_schema).unwrap();\n\nfor step in plan.steps {\n    println!(\"Migration step: {}\", step);\n}\n```\n\n### Analyzing OpenAPI Changes\n\n```rust\nuse rusty_schema_diff::prelude::*;\n\nlet analyzer = OpenApiAnalyzer;\nlet report = analyzer.analyze_compatibility(\u0026old_api, \u0026new_api).unwrap();\n\nprintln!(\"Breaking changes:\");\nfor change in report.changes.iter().filter(|c| c.is_breaking) {\n    println!(\"- {}: {}\", change.location, change.description);\n}\n```\n\n### Analyzing SQL DDL Changes\n\n```rust\nuse rusty_schema_diff::prelude::*;\n\nlet analyzer = SqlAnalyzer;\nlet report = analyzer.analyze_compatibility(\u0026old_ddl, \u0026new_ddl).unwrap();\n\n// Generate SQL migration statements\nlet plan = analyzer.generate_migration_path(\u0026old_ddl, \u0026new_ddl).unwrap();\nfor statement in plan.steps {\n    println!(\"SQL: {}\", statement);\n}\n```\n\n## Documentation\n\nFor detailed information on all available analyzers and their functionality, please refer to the [API Documentation](https://docs.rs/rusty-schema-diff).\n\n## License\n\nThis library is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frusty-libraries%2Frusty-schema-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frusty-libraries%2Frusty-schema-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frusty-libraries%2Frusty-schema-diff/lists"}