{"id":30910231,"url":"https://github.com/lbenedetto/json-schema-diff-validator","last_synced_at":"2026-05-07T09:33:18.821Z","repository":{"id":307908548,"uuid":"1031052396","full_name":"lbenedetto/json-schema-diff-validator","owner":"lbenedetto","description":"Detects breaking changes between two versions of a json schema","archived":false,"fork":false,"pushed_at":"2026-02-12T13:40:52.000Z","size":190,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-12T21:33:56.793Z","etag":null,"topics":["jackson","java","json-schema","jsonpatch"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lbenedetto.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-02T22:46:56.000Z","updated_at":"2026-02-12T13:21:13.000Z","dependencies_parsed_at":"2025-08-03T00:20:57.042Z","dependency_job_id":"9116b7ad-2256-436f-97df-a2d704fbf7ab","html_url":"https://github.com/lbenedetto/json-schema-diff-validator","commit_stats":null,"previous_names":["lbenedetto/json-schema-diff-validator"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/lbenedetto/json-schema-diff-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbenedetto%2Fjson-schema-diff-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbenedetto%2Fjson-schema-diff-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbenedetto%2Fjson-schema-diff-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbenedetto%2Fjson-schema-diff-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lbenedetto","download_url":"https://codeload.github.com/lbenedetto/json-schema-diff-validator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbenedetto%2Fjson-schema-diff-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32731438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["jackson","java","json-schema","jsonpatch"],"created_at":"2025-09-09T17:03:16.742Z","updated_at":"2026-05-07T09:33:18.816Z","avatar_url":"https://github.com/lbenedetto.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON Schema Diff Validator\n\nThis project is a JSON Schema Diff Validator library for the JVM. It helps validate that changes to JSON schemas maintain backward compatibility, which is crucial for ensuring that API changes don't break existing clients.\n\nIt was originally \"forked\" from https://www.npmjs.com/package/json-schema-diff-validator, but the logic has since been complete rewritten with a different approach which should be more robust and configurable at the same time.\n\n## Core Features\n\n- Validates that a new JSON schema is backward compatible with an old schema\n- Configurable validation rules for different types of changes\n- Detailed validation results with categorized issues (info, warnings, errors)\n\nIt is recommended to use this in combination with something like [com.github.victools:jsonschema-generator](https://github.com/victools/jsonschema-generator) in order to generate JSON schemas of your Java/Kotlin classes. Invalid JsonSchema json produces undefined results.\n\nThis library was created to help ensure that changes to a Java object will not break deserialization of cached JSON data, and as such the validation defaults are optimized for that use case.\n\n## How It Works\n\nThe validator compares two JSON schemas (old and new) and identifies changes that might break backward compatibility. It uses the [zjsonpatch](https://github.com/flipkart-incubator/zjsonpatch) library to compute the differences between schemas.\n\n## Installation\n\n### Gradle\n```kotlin\nimplementation(\"io.github.lbenedetto:json-schema-diff-validator:1.0.0\")\n```\n\n### Maven\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.lbenedetto\u003c/groupId\u003e\n  \u003cartifactId\u003ejson-schema-diff-validator\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Configuration Options\n\nThe validator can be configured with different compatibility levels for various types of changes:\n\n- `addingAnyOf`\n- `removingAnyOf`\n- `addingEnumValue`\n- `removingEnumValue`\n- `addingOptionalFields`\n- `removingOptionalFields`\n- `addingRequiredFields`\n- `removingRequiredFields`\n- `addingRequired`\n- `removingRequired`\n\nView the [Config](lib/src/main/kotlin/com/lbenedetto/Config.kt) class for full documentation of available options and their default values.\n\nEach option can be set to one of three compatibility levels:\n- `ALLOWED`: Detected changes will be added to the result as info\n- `DISCOURAGED`: Detected changes will be added to the result as warning\n- `FORBIDDEN`: Detected changes will be added to the result as error\n\n## Usage Example\n\nBasic usage with default configuration:\n```kotlin\nval result = Validator.validate(\"/path/to/schema-v1.json\", \"/path/to/schema-v2.json\")\n```\n\nUsage with custom configuration:\n```kotlin\n// Custom configuration\nval result = Validator.validate(oldSchemaPath, newSchemaPath, Config(\n  addingRequired = Compatibility.DISCOURAGED\n))\n```\n\nJava usage with custom configuration:\n```java\nvar result = Validator.validate(oldSchemaPath, newSchemaPath, Config.defaultConfig()\n    .addingRequired(Compatibility.DISCOURAGED));\n```\n\n## Dependencies\n\n- Jackson for JSON processing\n- zjsonpatch for computing JSON differences\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbenedetto%2Fjson-schema-diff-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flbenedetto%2Fjson-schema-diff-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbenedetto%2Fjson-schema-diff-validator/lists"}