{"id":15792664,"url":"https://github.com/mikeralphson/json-schema-diff","last_synced_at":"2026-05-06T18:33:48.926Z","repository":{"id":66094126,"uuid":"158678394","full_name":"MikeRalphson/json-schema-diff","owner":"MikeRalphson","description":"Mirror of Atlassian's json-schema-diff (from bitbucket.org)","archived":false,"fork":false,"pushed_at":"2018-11-22T09:59:31.000Z","size":156,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-30T04:56:39.346Z","etag":null,"topics":["diff","json","json-schema","jsonschema"],"latest_commit_sha":null,"homepage":"https://bitbucket.org/atlassian/json-schema-diff","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MikeRalphson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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":"2018-11-22T09:59:14.000Z","updated_at":"2023-10-26T08:56:40.000Z","dependencies_parsed_at":"2023-05-09T19:32:14.693Z","dependency_job_id":null,"html_url":"https://github.com/MikeRalphson/json-schema-diff","commit_stats":{"total_commits":34,"total_committers":4,"mean_commits":8.5,"dds":0.6470588235294117,"last_synced_commit":"9ed99c27c0a0a69f5f765c7b2e54bd8cd5350205"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MikeRalphson/json-schema-diff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeRalphson%2Fjson-schema-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeRalphson%2Fjson-schema-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeRalphson%2Fjson-schema-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeRalphson%2Fjson-schema-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MikeRalphson","download_url":"https://codeload.github.com/MikeRalphson/json-schema-diff/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeRalphson%2Fjson-schema-diff/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268340168,"owners_count":24234675,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["diff","json","json-schema","jsonschema"],"created_at":"2024-10-04T23:02:40.325Z","updated_at":"2026-05-06T18:33:48.885Z","avatar_url":"https://github.com/MikeRalphson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Json Schema Diff\n\u003e A language agnostic CLI tool and nodejs api to identify differences between two json schema files.\n\n## Requirements\n- nodejs 6.x or higher (tested using 6.x, 8.x and 9.x)\n- npm 2.x or higher (tested using 2.x, 3.x and 5x)\n\n## Installation\n\nInstall the tool using npm and add it to the package.json   \n```\nnpm install json-schema-diff --save-dev\n```\n\n## Usage\n\nThis tool identifies differences between two json schema files.\n[KEYWORDS.md](KEYWORDS.md) contains the details of what json schema keywords are supported.\nDifferences are classified into two broad groups, added and removed.\n\nAdded differences are areas where the destination schema has become more permissive relative to the source schema. For example `{\"type\": \"string\"}` -\u003e `{\"type\": [\"string\", \"number\"]}`.\n\n\nRemoved differences are areas where the destination schema has become more restrictive relative to the source schema. For example `{\"type\": [\"string\", \"number\"]}` -\u003e `{\"type\": \"string\"}`.\n\n### Usage as a cli tool\n\nInvoke the tool with a file path to the source schema file and the destination schema file. \nThese files should be in JSON format and be valid according to the json schema draft-07 specification.\n\n```\njson-schema-diff /path/to/source-spec.json /path/to/destination-spec.json\n```\n\nThe command will return a collection of any differences found in a human readable format. \n\nThe tool will fail if any removed differences are detected.\n\n### Usage as a nodejs api\n\nInvoke the library with the source schema and the destination schema. \nThese objects should be simple javascript objects and we valid according to the json schema draft-07 specification.\n\n```\nconst jsonSchemaDiff = require('json-schema-diff');\n\nconst source = {type: 'string'};\nconst destination = {type: ['string', 'number']};\n\nconst result = await jsonSchemaDiff.diffSchemas({\n    sourceSchema: source, \n    destinationSchema: destination\n});\n\nif (result.removedByDestinationSchema) {\n    console.log('Something was removed!');\n}\n\nif (result.addedByDestinationSchema) {\n    console.log('Something was added!');\n}\n```\n\nFor full details of the nodejs api please refer to [api-types.d.ts](lib/api-types.d.ts)\n\n## Changelog\nSee [CHANGELOG.md](CHANGELOG.md)\n\n## Contributing\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## License\nSee [LICENSE.txt](LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeralphson%2Fjson-schema-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeralphson%2Fjson-schema-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeralphson%2Fjson-schema-diff/lists"}